aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-04-24 10:56:26 +0900
committerGitHub <noreply@github.com>2024-04-24 10:56:26 +0900
commita1b1c4a6d1d52916c5d885170a5f54632d579cdc (patch)
tree6eff3a4dfd6f0c334605acc61de94feddb319459 /llvm/lib/CodeGen/MachineInstr.cpp
parentd97cdd7d088b11b45038112a5f7fe5cbf60a6461 (diff)
downloadllvm-a1b1c4a6d1d52916c5d885170a5f54632d579cdc.zip
llvm-a1b1c4a6d1d52916c5d885170a5f54632d579cdc.tar.gz
llvm-a1b1c4a6d1d52916c5d885170a5f54632d579cdc.tar.bz2
[InstCombine] Fix miscompile in negation of select (#89698)
Swapping the operands of a select is not valid if one hand is more poisonous that the other, because the negation zero contains poison elements. Fix this by adding an extra parameter to isKnownNegation() to forbid poison elements. I've implemented this using manual checks to avoid needing four variants for the NeedsNSW/AllowPoison combinations. Maybe there is a better way to do this... Fixes https://github.com/llvm/llvm-project/issues/89669.
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions