[PATCH] D45107: [InstCombine] [NFC] Add tests for getting rid of select of bittest (PR36950 / PR17564)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 3 12:56:52 PDT 2018
spatel added inline comments.
================
Comment at: test/Transforms/InstCombine/select-of-bittest.ll:447-450
+define i32 @n9(i32) {
+; CHECK-LABEL: @n9(
+; CHECK-NEXT: ret i32 1
+;
----------------
This is testing that some other folds work as expected, so it doesn't really belong here IMO.
================
Comment at: test/Transforms/InstCombine/select-of-bittest.ll:467
+ %3 = icmp eq i32 %2, 0
+ %4 = lshr i32 %0, 32 ; shifting by 32 leaves no bits
+ %5 = and i32 %4, 1
----------------
Similar to @n9, I'd remove this test because the pattern shouldn't survive as-is before we get to the select.
The comment isn't correct - shifting by the bit-width produces a poison value.
Repository:
rL LLVM
https://reviews.llvm.org/D45107
More information about the llvm-commits
mailing list