This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Add Assert[SZ]Ext during argument load creation
ClosedPublic

Authored by arsenm on Dec 16 2016, 4:06 PM.

Details

Summary

For i16 zeroext arguments when i16 was a legal type, the
known bits information from the truncate was lost. Insert
a zeroext so the known bits optimizations work with the 32-bit
loads.

Fixes code quality regressions vs. SI in min.ll test.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 81815.Dec 16 2016, 4:06 PM
arsenm retitled this revision from to AMDGPU: Add Assert[SZ]Ext during argument load creation.
arsenm updated this object.
arsenm added a subscriber: llvm-commits.
kzhuravl added inline comments.Jan 4 2017, 11:21 AM
lib/Target/AMDGPU/SIISelLowering.cpp
728–732

Drop braces for single line ifs?

test/CodeGen/AMDGPU/min.ll
83–91

Merge and rename to GCN label?

arsenm updated this revision to Diff 83649.Jan 9 2017, 10:34 AM
arsenm edited edge metadata.

Braces

arsenm added inline comments.Jan 9 2017, 10:34 AM
test/CodeGen/AMDGPU/min.ll
83–91

These should be different since I would hope the mins would be legalized to i16 min, so I think it's better to keep them separate to show this is a problem

kzhuravl accepted this revision.Jan 9 2017, 10:35 AM
kzhuravl added a reviewer: kzhuravl.

LGTM

This revision is now accepted and ready to land.Jan 9 2017, 10:35 AM
arsenm closed this revision.Jan 9 2017, 11:04 AM

r291461