This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Return correct type during argument lowering
ClosedPublic

Authored by arsenm on Jul 14 2017, 12:38 PM.

Details

Reviewers
tstellar
rampitec
Summary

The type needs to be casted back to the original argument type.
Fixes an assert that for some reason is only run when
using -debug.

Includes an additional combine to avoid test regressions
from having conversions mixed with multiple Assert[SZ]ext
nodes. On subtargets where i16 is legal, this was producing an i32
register with an i16 AssertZExt, truncated to i16 with another i8
AssertZExt.

t2: i32,ch = CopyFromReg t0, Register:i32 %vreg0
t3: i16 = truncate t2
t5: i16 = AssertZext t3, ValueType:ch:i8
t6: i8 = truncate t5
t7: i32 = zero_extend t6

Diff Detail

Event Timeline

arsenm created this revision.Jul 14 2017, 12:38 PM
This revision is now accepted and ready to land.Jul 14 2017, 2:41 PM
arsenm closed this revision.Jul 14 2017, 10:53 PM

r308082