diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2018-04-13 09:57:57 +0000 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2018-04-13 09:57:57 +0000 |
commit | c00659328a39d049ab4be3c422c041800c5c99b8 (patch) | |
tree | dd4490c24235d6618640b6beba7b43ecc12300ea /llvm/lib/CodeGen/MachinePipeliner.cpp | |
parent | ea626e37ba024918ef04f4522694dcd5c4030be8 (diff) | |
download | llvm-c00659328a39d049ab4be3c422c041800c5c99b8.zip llvm-c00659328a39d049ab4be3c422c041800c5c99b8.tar.gz llvm-c00659328a39d049ab4be3c422c041800c5c99b8.tar.bz2 |
[InstCombine]: foldSelectICmpAndAnd(): and is commutative
Summary:
The fold added in 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 [[ https://bugs.llvm.org/show_bug.cgi?id=6773 | PR6773 ]]
This extends/generalizes that fold, so it is handled too.
Reviewers: spatel, craig.topper
Reviewed By: spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45539
llvm-svn: 330001
Diffstat (limited to 'llvm/lib/CodeGen/MachinePipeliner.cpp')
0 files changed, 0 insertions, 0 deletions