aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Module.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2021-10-09 11:34:48 -0400
committerSanjay Patel <spatel@rotateright.com>2021-10-09 11:39:49 -0400
commitacafde09a3fa9560148605f35f9c3d3f1444bc15 (patch)
tree4b2b2fd817bed402f7ca7a59a60efb93c89d3947 /clang/lib/Basic/Module.cpp
parentcd76fa79b01aef8afe219323f713ca1607d7a98f (diff)
downloadllvm-acafde09a3fa9560148605f35f9c3d3f1444bc15.zip
llvm-acafde09a3fa9560148605f35f9c3d3f1444bc15.tar.gz
llvm-acafde09a3fa9560148605f35f9c3d3f1444bc15.tar.bz2
[InstCombine] enhance icmp with sub folds
There were 2 related but over-specified folds for: C1 - X == C One allowed multi-use but was limited to equal constants. The other allowed different constants but disallowed multi-use. This combines the 2 folds into a more general match. The test diffs show the multi-use cases that were falling through the cracks. https://alive2.llvm.org/ce/z/4_hEt2 define i1 @src(i8 %x, i8 %subC, i8 %C) { %s = sub i8 %subC, %x %r = icmp eq i8 %s, %C ret i1 %r } define i1 @tgt(i8 %x, i8 %subC, i8 %C) { %newC = sub i8 %subC, %C %isneg = icmp eq i8 %x, %newC ret i1 %isneg }
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
0 files changed, 0 insertions, 0 deletions