[PATCH] D47922: unsigned foo(unsigned x, unsigned y) { return x > y && x != 0; } should fold to x > y

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 7 23:56:26 PDT 2018


lebedev.ri added inline comments.


================
Comment at: test/Transforms/InstCombine/and3.ll:4
+
+; x > y && x != 0 -> x > y
+
----------------
HLJ2009 wrote:
> lebedev.ri wrote:
> > Can you place it next to the rest of the tests from `simplifyUnsignedRangeCheck()`?
> Yes, I want to do it. However I've looked for a test file specific to simplifyUnsignedRangeCheck, but I didn't find it. If possible, I can add the remaining test cases for simplifyUnsignedRangeCheck
Cripple that function:
```
static Value *simplifyUnsignedRangeCheck(ICmpInst *ZeroICmp,
                                         ICmpInst *UnsignedICmp, bool IsAnd) {
  return nullptr;
...
}
```
and look through the tests that are now failing.
I think it might be `test/Transforms/InstCombine/range-check.ll`.


Repository:
  rL LLVM

https://reviews.llvm.org/D47922





More information about the llvm-commits mailing list