[PATCH] D38710: AMDGPU: Fix failure to select branch with optnone
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 10 10:38:02 PDT 2017
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:1647
- SDValue VCC = CurDAG->getCopyToReg(N->getOperand(0), SL, AMDGPU::VCC, Cond);
- CurDAG->SelectNodeTo(N, AMDGPU::S_CBRANCH_VCCNZ, MVT::Other,
+ SDValue VCC = CurDAG->getCopyToReg(N->getOperand(0), SL, CondReg, Cond);
+ CurDAG->SelectNodeTo(N, BrOp, MVT::Other,
----------------
rampitec wrote:
> Why cannot we use condition register w/o a copy?
It needs to be associated with a chain and glue. You don't know if the condition is using vcc already, like the condition is probably an unknown SGPR right ow.
I'm actually surprised this worked with SCC, since I think this needs to use the glued def without the copy but it seems to do the right thing.
https://reviews.llvm.org/D38710
More information about the llvm-commits
mailing list