[all-commits] [llvm/llvm-project] 29661f: [InstCombine] add tests for logical-and / logical-...
Sanjay Patel via All-commits
all-commits at lists.llvm.org
Tue Nov 1 13:48:02 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 29661fe94bf12ced1f99c80914c3c87ba4198ab4
https://github.com/llvm/llvm-project/commit/29661fe94bf12ced1f99c80914c3c87ba4198ab4
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2022-11-01 (Tue, 01 Nov 2022)
Changed paths:
M llvm/test/Transforms/InstCombine/select-safe-transforms.ll
Log Message:
-----------
[InstCombine] add tests for logical-and / logical-or folds; NFC
Commit: ec0b406e16c44f1554e409b20ba6d7a76e3fe08d
https://github.com/llvm/llvm-project/commit/ec0b406e16c44f1554e409b20ba6d7a76e3fe08d
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2022-11-01 (Tue, 01 Nov 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
M llvm/test/Transforms/InstCombine/select-safe-transforms.ll
Log Message:
-----------
[InstCombine] use logical-or matcher to avoid crash
This should prevent crashing for the example in issue #58552
by not matching a select-of-vectors-with-scalar-condition.
A similar change is likely needed for the related fold to
properly fix that kind of bug.
The test that shows a regression seems unlikely to occur
in real code.
This also picks up an optimization in the case where a real
(bitwise) logic op is used. We could already convert some
similar select ops to real logic via impliesPoison(), so
we don't see more diffs on commuted tests. Using commutative
matchers (when safe) might also handle one of the TODO tests.
Compare: https://github.com/llvm/llvm-project/compare/880b37f175c7...ec0b406e16c4
More information about the All-commits
mailing list