This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Mark 32-bit float constants as legal
ClosedPublic

Authored by tstellar on May 15 2017, 2:06 PM.

Event Timeline

tstellar created this revision.May 15 2017, 2:06 PM
arsenm added inline comments.May 16 2017, 6:53 AM
lib/Target/AMDGPU/SIInstrInfo.cpp
2118–2120

Why is this necessary? It looks like a separate change

test/CodeGen/AMDGPU/GlobalISel/legalize-constant.mir
34–36

It might be worthwhile to test a non-inline immediate value too

tstellar added inline comments.May 16 2017, 6:57 AM
lib/Target/AMDGPU/SIInstrInfo.cpp
2118–2120

The verifier rejects G_FCONSTANT instructions, because they have FPImm operands.

arsenm added inline comments.May 16 2017, 6:59 AM
lib/Target/AMDGPU/SIInstrInfo.cpp
2118–2120

Does the base verifier do anything for these? This should call the base implementation

arsenm added inline comments.May 16 2017, 7:01 AM
lib/Target/AMDGPU/SIInstrInfo.cpp
2118–2120

I guess the description is it's for target instructions, and the verifier itself could handle generic ones so nevermind

arsenm accepted this revision.May 17 2017, 12:54 PM

LGTM

This revision is now accepted and ready to land.May 17 2017, 12:54 PM
This revision was automatically updated to reflect the committed changes.