This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Fix artifact combiner constant legality checks for vectors
ClosedPublic

Authored by arsenm on Feb 3 2019, 9:03 AM.

Details

Summary

Since G_CONSTANT is illegal for vectors, this needs to check
what buildConstant will produce for a splat vector.

Diff Detail

Event Timeline

arsenm created this revision.Feb 3 2019, 9:03 AM
arsenm updated this revision to Diff 184961.Feb 3 2019, 9:05 AM

Include actual change

test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-sext.mir
16

Is this correct ? We're shifting a 32 bit source by 32 into 32 bit destination.

arsenm updated this revision to Diff 185214.Feb 4 2019, 6:43 PM
arsenm marked an inline comment as done.

Fix using getSizeInBits instead of getScalarSizeInBits

aditya_nandakumar accepted this revision.Feb 5 2019, 7:54 AM

Thanks. LGTM.

This revision is now accepted and ready to land.Feb 5 2019, 7:54 AM
arsenm closed this revision.Feb 7 2019, 10:58 AM

r353449

test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-sext.mir
16

Thanks, I have another patch where I've been auditing all the getSizeInBits which should be getScalarSizeInBits