[PATCH] D35434: AMDGPU: Return correct type during argument lowering

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 12:38:45 PDT 2017


arsenm created this revision.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl.

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


https://reviews.llvm.org/D35434

Files:
  lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  lib/Target/AMDGPU/AMDGPUISelLowering.h
  lib/Target/AMDGPU/SIISelLowering.cpp
  test/CodeGen/AMDGPU/function-args.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35434.106692.patch
Type: text/x-patch
Size: 4714 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170714/7464bf38/attachment.bin>


More information about the llvm-commits mailing list