Basic version was merged - https://reviews.llvm.org/D49954
This adds support for FP & non-commutative opcodes
Precommited tests: https://reviews.llvm.org/rL338727
Paths
| Differential D50190
[InstCombine] Fold Select with binary op - non-commutative opcodes ClosedPublic Authored by xbolva00 on Aug 2 2018, 8:12 AM.
Details Summary Basic version was merged - https://reviews.llvm.org/D49954 This adds support for FP & non-commutative opcodes Precommited tests: https://reviews.llvm.org/rL338727
Diff Detail Event TimelineComment Actions Let's handle this one step at a time. Please remove the FP changes. Let's make this patch only about handling the non-commutative integer binops. Also, we should have tests for 'ne' for the non-commutative ops. Please add those as a preliminary commit if they're not already here. And add test for udiv/sdiv?
Comment Actions
Comment Actions
There aren't any positive tests for 'ne' predicates with the non-commutative opcodes? Comment Actions You should be able to adjust 2 lines of code to allow non-commutative ops after: Comment Actions
Ok, I will rebase it. xbolva00 retitled this revision from [InstCombine] Fold Select with binary op - FP/non-commutative opcodes to [InstCombine] Fold Select with binary op - non-commutative opcodes.Aug 10 2018, 9:10 AM Comment Actions
Please rebase/update tests again. I had to revert rL339439 because it had a bug exposed by rearranging the predicates for this fold. I added/adjusted tests for that at rL339453, so should be fixed with rL339469. This revision is now accepted and ready to land.Aug 12 2018, 8:07 AM Closed by commit rL339520: [InstCombine] Fold Select with binary op - non-commutative opcodes (authored by xbolva00). · Explain WhyAug 12 2018, 10:30 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 160113 lib/Transforms/InstCombine/InstCombineSelect.cpp
test/Transforms/InstCombine/select-binop-icmp.ll
|
I would like to simplify it. But not sure what is prefered here. So kindly asking for advice :)