[PATCH] D43835: Simplify more cases of logical ops of masked icmps.
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 1 11:08:45 PST 2018
davidxl added inline comments.
================
Comment at: test/Transforms/InstCombine/icmp-logical.ll:332
+; no change.
+define i1 @or_masked_icmps_mask_notallzeros_bmask_mixed_1(i32 %x) {
+; CHECK-LABEL: @or_masked_icmps_mask_notallzeros_bmask_mixed_1(
----------------
This one should be simplified to x & 15 != 9 // aka 1001
================
Comment at: test/Transforms/InstCombine/icmp-logical.ll:364
+; ((X & 15) == 0 || (X & 7) != 0) -> !((X & 15) != 0 && (X & 7) == 0) ->
+; no change.
+define i1 @or_masked_icmps_mask_notallzeros_bmask_mixed_3(i32 %x) {
----------------
This one should be simplified to x & 15 != 8
================
Comment at: test/Transforms/InstCombine/icmp-logical.ll:430
+
+; ((X & 7) == 0 || (X & 15) != 8) -> !(((X & 7) != 0 && (X & 15) == 8)) ->
+; !(false) -> true
----------------
perhaps also add a case of (x&6) == 0) || (x&15)!= 8 ==> true
Repository:
rL LLVM
https://reviews.llvm.org/D43835
More information about the llvm-commits
mailing list