This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Treat undef as an inline immediate
ClosedPublic

Authored by arsenm on Jun 19 2019, 8:29 AM.

Details

Reviewers
rampitec
Summary

This should only matter in vectors with an undef component, since a
full undef vector would have been folded out.

Diff Detail

Event Timeline

arsenm created this revision.Jun 19 2019, 8:29 AM
rampitec added inline comments.Jun 19 2019, 2:23 PM
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
497

There is another use of isInlineImmediate (check case ISD::ConstantFP) around line 761. You will return true, but you do not initialize Imm with zero there.

arsenm marked an inline comment as done.Jun 19 2019, 3:55 PM
arsenm added inline comments.
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
497

The check for ConstantFP selection isn't using the value of this, and just uses it to fallback to selection patterns which handles undef. It doesn't need to be and shouldn't be 0 always, it's just useful in this context

This revision is now accepted and ready to land.Jun 20 2019, 8:02 AM
arsenm closed this revision.Jun 20 2019, 8:57 AM

r363941