Page MenuHomePhabricator

AMDGPU: Improve nsw/nuw/exact when promoting uniform i16 ops
ClosedPublic

Authored by arsenm on Dec 8 2016, 11:31 AM.

Details

Summary

These were simply preserving the flags of the original operation,
which was too conservative in most cases and incorrect for mul.

nsw/nuw may be needed for some combines to cleanup messes when
intermediate sext_inregs are introduced later.

Tested valid combinations with alive: https://paste.fedoraproject.org/501959/

Diff Detail

Event Timeline

arsenm updated this revision to Diff 80796.Dec 8 2016, 11:31 AM
arsenm retitled this revision from to AMDGPU: Improve nsw/nuw/exact when promoting uniform i16 ops.
arsenm updated this object.
arsenm added a subscriber: llvm-commits.
arsenm updated this object.Dec 8 2016, 11:32 AM
arsenm edited edge metadata.
arsenm updated this revision to Diff 80798.Dec 8 2016, 11:34 AM

Attach right version

kzhuravl added inline comments.Dec 8 2016, 11:47 AM
lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
221

Should copyFlags be completely removed?

arsenm added inline comments.Dec 20 2016, 9:40 AM
lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
221

Yes, I noticed this after I posted

kzhuravl accepted this revision.Jan 31 2017, 2:36 PM

LGTM with copyFlags removed.

This revision is now accepted and ready to land.Jan 31 2017, 2:36 PM
arsenm closed this revision.Feb 1 2017, 8:36 AM

r293776