diff options
author | Nikita Popov <npopov@redhat.com> | 2025-08-25 12:58:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-25 12:58:39 +0200 |
commit | f8f6965ceece9e330ddb66db5f402ecfb5e3ad34 (patch) | |
tree | fec116c449894c1ddb14c751a2e5c73e1d131b64 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | c540678920f6ef606b1dbb252a7ad39dd838f78f (diff) | |
download | llvm-f8f6965ceece9e330ddb66db5f402ecfb5e3ad34.zip llvm-f8f6965ceece9e330ddb66db5f402ecfb5e3ad34.tar.gz llvm-f8f6965ceece9e330ddb66db5f402ecfb5e3ad34.tar.bz2 |
[InstCombine] Allow freezing multiple operands (#154336)
InstCombine tries to convert `freeze(inst(op))` to `inst(freeze(op))`.
Currently, this is limited to the case where a single operand needs to
be frozen, and all other operands are guaranteed non-poison.
This patch allows the transform even if multiple operands need to be
frozen. The existing limitation makes sure that we do not increase the
total number of freezes, but it also means that that we may fail to
eliminate freezes (via poison flag dropping) and may prevent
optimizations (as analysis generally can't look past freeze). Overall, I
believe that aggressively pushing freezes upwards is more beneficial
than harmful.
This is the middle-end version of #145939 in DAGCombine (which is
currently reverted for SDAG-specific reasons).
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions