Remove checks for basic blocks.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
A virtual register can have multiple definitions. I think you need to make sure you are using a right one. Can you please forge a test like:
if (...) vregx = some_sdwa_cand;
else vregx = other_sdwa_cand;
use vregx;
and see what is folded at use?
You can conservatively use getUniqueVRegDef to make sure there is only one def, or make sure which def is really used. If you use getUniqueVRegDef it may decrease even current optimization scope since in many cases you have subreg candidates, which have multiple defs.
Comment Actions
This is an SSA pass, there is only one reg def. Using getUniqueVRegDef is not necessary