diff options
author | Petar Avramovic <Petar.Avramovic@amd.com> | 2025-01-24 12:43:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-24 12:43:40 +0100 |
commit | b60c118f53e6f7e5328e54dc26b4d6787030c02b (patch) | |
tree | d95d82a8b2a6c05be37a5d01ebc25c85249bd7df /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 5ce349589a4adcc18f5807551bf4b78091746aa8 (diff) | |
download | llvm-b60c118f53e6f7e5328e54dc26b4d6787030c02b.zip llvm-b60c118f53e6f7e5328e54dc26b4d6787030c02b.tar.gz llvm-b60c118f53e6f7e5328e54dc26b4d6787030c02b.tar.bz2 |
MachineUniformityAnalysis: Improve isConstantOrUndefValuePhi (#112866)
Change existing code for G_PHI to match what LLVM-IR version is doing
via PHINode::hasConstantOrUndefValue. This is not safe for regular PHI
since it may appear with an undef operand and getVRegDef can fail.
Most notably this improves number of values that can be allocated
to sgpr in AMDGPURegBankSelect.
Common case here are phis that appear in structurize-cfg lowering
for cycles with multiple exits:
Undef incoming value is coming from block that reached cycle exit
condition, if other incoming is uniform keep the phi uniform despite
the fact it is joining values from pair of blocks that are entered
via divergent condition branch.
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
0 files changed, 0 insertions, 0 deletions