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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 19 19:17:51 PDT 2017


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/SIFoldOperands.cpp:472
 
     MachineInstr *Def = MRI.getVRegDef(Op.getReg());
+    if (Def && Def->isMoveImmediate()) {
----------------
rampitec wrote:
> 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.
I'm not sure what you mean. I don't think it works post-SSA. Changing that belongs as a separate change if that ends up being useful


https://reviews.llvm.org/D34378





More information about the llvm-commits mailing list