[all-commits] [llvm/llvm-project] ee50c0: [InstCombine] Fix bug in canonicalization of Pow2 ...
goldsteinn via All-commits
all-commits at lists.llvm.org
Sun Jul 23 09:57:53 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ee50c09117a54fe1ff66603ef21ba6afe07b8b53
https://github.com/llvm/llvm-project/commit/ee50c09117a54fe1ff66603ef21ba6afe07b8b53
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2023-07-23 (Sun, 23 Jul 2023)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/ispow2.ll
Log Message:
-----------
[InstCombine] Fix bug in canonicalization of Pow2 Tests (From: D152673)
D152673 Incorrectly didn't account for operand position in the `icmp`,
i.e it treated `icmp uge x, y` the same as `icmp uge y, x` which is
incorrect:
https://reviews.llvm.org/rG142f7448e770f25b774b058a7eab1f107c4daad9
The fix takes operand position into account. The new tests
exhaustively cover all operand positions for `ule`, `uge`, `ult`,
`ugt` (the set of predicates) and all transform verify with the new
commit.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D156058
More information about the All-commits
mailing list