[PATCH] D25198: AMDGPU/SI: Fix LowerParameter() for i16 arguments
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 13 08:31:45 PDT 2016
tstellarAMD added inline comments.
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:587-592
- ExtTy = ISD::EXTLOAD;
+ Val = DAG.getNode(ISD::FP_EXTEND, SL, VT, Load);
+ else if (Signed)
+ Val = DAG.getSExtOrTrunc(Load, SL, VT);
+ Val = DAG.getZExtOrTrunc(Load, SL, VT);
> arsenm wrote:
> > When is the trunc case necessary? Since the FP case only needs to handle extend this looks weird to me
> Trunc is required when VT is MVT::i16 and MemVT is MVT::i32.
This happens for mesa, because 16-bit kernel arguments are stored as 32-bit values in the kernarg buffer.
More information about the llvm-commits