[PATCH] D34378: AMDGPU: Fix crash with undef vreg input operand

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 19 19:13:20 PDT 2017


rampitec added inline comments.


================
Comment at: lib/Target/AMDGPU/SIFoldOperands.cpp:472
 
     MachineInstr *Def = MRI.getVRegDef(Op.getReg());
+    if (Def && Def->isMoveImmediate()) {
----------------
arsenm wrote:
> rampitec wrote:
> > getUniqueVRegDef?
> I think that should only ever be used post-SSA. This is an SSA pass, so the concern isn't whether or not there are multiple defs of the same register
If works fine past SSA in general, so I believe it is better to fix that as well.


https://reviews.llvm.org/D34378





More information about the llvm-commits mailing list