This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix failure to select branch with optnone
ClosedPublic

Authored by arsenm on Oct 9 2017, 4:12 PM.

Details

Reviewers
jsjodin
rampitec
Summary

opt-bisect/optnone disable the AMDGPUUniformAnnotateValues pass.
The heuristic in the custom selector for brcond deferred the
branch uniformity check to the pattern, which would fail.

Diff Detail

Event Timeline

arsenm created this revision.Oct 9 2017, 4:12 PM
arsenm updated this revision to Diff 118293.Oct 9 2017, 4:19 PM

Right version of test

rampitec added inline comments.Oct 10 2017, 10:28 AM
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
1647

Why cannot we use condition register w/o a copy?

arsenm added inline comments.Oct 10 2017, 10:38 AM
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
1647

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.

This revision is now accepted and ready to land.Oct 10 2017, 10:41 AM
arsenm closed this revision.Oct 10 2017, 1:34 PM

r315360