For both operands are unsigned, add the following optimization test case.
- X > Y && X != 0 --> X > Y
- X > Y || X != 0 --> X != 0
- X <= Y || X != 0 --> true
- X <= Y || X == 0 --> X <= Y
- X > Y && X == 0 --> false
Differential D48000
[InstSimplify][NFC] Add tests for some missed optimization opportunities in simplifyUnsignedRangeCheck() HLJ2009 on Jun 10 2018, 11:55 PM. Authored by
Details For both operands are unsigned, add the following optimization test case.
Diff Detail Event TimelineComment Actions I think we've sorted out the problem in D47922, but this patch is not correct as shown. It should show the results (the missed optimization) that we currently get using trunk. Please update. Comment Actions Yes, I want to do this. When this test file is accepted, I update D47922 again. Can I see the corresponding improvement ? Comment Actions I don't understand. Are you unable to update this patch on Phabricator with the current CHECK lines? Comment Actions sorroy, I know how to submit change to phabricator, but I don't know how to use utils/update_test_checks.py to get the difference file we want and set the test baseline. I made some attempts but it seems to be incorrect. Comment Actions $ cd llvm $ git checkout master # the svn trunk $ arc patch D48000 $ cd ../llvm-build/ # or whereever $ ninja $ ../llvm/utils/utils/update_test_checks.py --opt-binary ./bin/opt ../llvm/test/test/Transforms/InstSimplify/AndOrXor.ll $ git commit --amend $ git diff -p -U99999 master..arcpatch-D48000 > /tmp/patch.patch # i.e. from svn trunk to this commit $ # Update this differential with that patch. Comment Actions use utils/update_test_checks.py to get the difference file we want and set the test baseline. Comment Actions No, I don't have.After code review, do we need to submit it to git itself ? Would you help me submit it to git before I apply for permission? Thanks very much. |