Teach LVI how to gather information from conditions in the form of (cond1 && cond2). Our out-of-tree front-end emits range checks in this form.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
lgtm with comments addressed
lib/Analysis/LazyValueInfo.cpp | ||
---|---|---|
1244 ↗ | (On Diff #66928) | I'd suggest using a visited set here. That way you don't infinitely recurse in unreachable code (I'm not sure if that is filtered out already) and won't have exponential time complexity for cases like %c0 = icmp .. %c1 = icmp .. %a0 = and %c0, %c1 %a1 = and %a0, %a0 %a2 = and %a1, %a1 %a3 = and %a2, %a2 %a4 = and %a3, %a3 %a5 = and %a4, %a4 ... |
test/Transforms/CorrelatedValuePropagation/add.ll | ||
155 ↗ | (On Diff #66928) | I'd also throw in a if (a s< Unknown && Unknown2) b = a + 1; to if (a s< Unknown && Unknown2) b = a nsw+ 1; type transform. |