This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Add G_FCANONICALIZE instruction
ClosedPublic

Authored by arsenm on Feb 8 2019, 5:39 AM.

Diff Detail

Event Timeline

arsenm created this revision.Feb 8 2019, 5:39 AM
test/CodeGen/AMDGPU/GlobalISel/legalize-fcanonicalize.mir
21

IIUC, there needs to be a side effecting user of %1 otherwise it'll be DCEd. Is a

$vgpr0 = COPY %1

missing here?

36

Ditto.

arsenm marked an inline comment as done.Feb 8 2019, 12:08 PM
arsenm added inline comments.
test/CodeGen/AMDGPU/GlobalISel/legalize-fcanonicalize.mir
21

Thanks, there were a bunch of these I had been copying between tests. I thought I had found all of them already

arsenm updated this revision to Diff 186024.Feb 8 2019, 12:10 PM

Fix test

LGTM. Minor comment that's not really concerning - but if you feel like it please fix that as well.

test/CodeGen/AMDGPU/GlobalISel/legalize-fcanonicalize.mir
61

It's a bit weird mixing integer truncates with FPExts, but as this is just a test, it probably can't hurt.

This revision is now accepted and ready to land.Feb 8 2019, 12:24 PM
arsenm marked an inline comment as done.Feb 8 2019, 1:05 PM
arsenm added inline comments.
test/CodeGen/AMDGPU/GlobalISel/legalize-fcanonicalize.mir
61

This is correct, the ABI is passing half as the low 16 bits of a 32-bit register

test/CodeGen/AMDGPU/GlobalISel/legalize-fcanonicalize.mir
61

That makes sense. Thanks

arsenm closed this revision.Feb 11 2019, 9:05 AM

r353719