aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorazwolski <antoni.zwolski@intel.com>2025-10-15 13:11:59 +0200
committerGitHub <noreply@github.com>2025-10-15 11:11:59 +0000
commitfcd7b8daa1633ae2549365438aab03eca92b1a44 (patch)
treeb954fcff5820de1e62873b3db85a79f1fa95a2ec /llvm/tools/llvm-objdump/llvm-objdump.cpp
parent727525629ed4fec4b802ab0d53ea61696316b045 (diff)
downloadllvm-fcd7b8daa1633ae2549365438aab03eca92b1a44.zip
llvm-fcd7b8daa1633ae2549365438aab03eca92b1a44.tar.gz
llvm-fcd7b8daa1633ae2549365438aab03eca92b1a44.tar.bz2
[X86] Add baseline test for X86 conditional load/store optimization bug (#163354)
This PR adds a baseline test that exposes a bug in the current `combineX86CloadCstore` optimization. The generated assembly demonstrates incorrect behavior when the optimization is applied without proper constraints. Without any assumptions about `X` this transformation is only valid when `Y` is a non zero power of two/single-bit mask. ```cpp // res, flags2 = sub 0, (and (xor X, -1), Y) // cload/cstore ..., cond_ne, flag2 // -> // res, flags2 = sub 0, (and X, Y) // cload/cstore ..., cond_e, flag2 ``` In the provided test case, the value in `%al` is unknown at compile time. If `%al` contains `0`, the optimization cannot be applied, because `(and (xor X, -1), 0)` is not equal to `(and X, 0)`. Fix: https://github.com/llvm/llvm-project/pull/163353
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions