[PATCH] D45539: [InstCombine][NFC]: foldSelectICmpAndAnd(): and is commutative
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 11 15:22:12 PDT 2018
lebedev.ri created this revision.
lebedev.ri added reviewers: spatel, craig.topper.
The fold added in https://reviews.llvm.org/D45108 did not account for the fact that
the and instruction is commutative, and if the mask is a variable,
the mask variable and the fold variable may be swapped.
I have noticed this by accident when looking into PR6773 <https://bugs.llvm.org/show_bug.cgi?id=6773>
This extends/generalizes that fold, so it is handled too.
Repository:
rL LLVM
https://reviews.llvm.org/D45539
Files:
lib/Transforms/InstCombine/InstCombineSelect.cpp
test/Transforms/InstCombine/select-of-bittest.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45539.142080.patch
Type: text/x-patch
Size: 4932 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180411/3abb0922/attachment.bin>
More information about the llvm-commits
mailing list