mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
5f36b4cd05
Summary: According to PTX ISA: For convenience, ld, st, and cvt instructions permit source and destination data operands to be wider than the instruction-type size, so that narrow values may be loaded, stored, and converted using regular-width registers. For example, 8-bit or 16-bit values may be held directly in 32-bit or 64-bit registers when being loaded, stored, or converted to other types and sizes. The operand type checking rules are relaxed for bit-size and integer (signed and unsigned) instruction types; floating-point instruction types still require that the operand type-size matches exactly, unless the operand is of bit-size type. So, the ISA does not support load with extending/store with truncatation for floating numbers. This is reflected in setting the loadext/truncstore actions to expand in the code for floating numbers, but vectors of floating numbers are not taken care of. As a result, loading a vector of floats followed by a fp_extend may be combined by DAGCombiner to a extload, and the extload may be lowered to NVPTXISD::LoadV2 with extending information. However, NVPTXISD::LoadV2 does not perform extending, and no extending instructions are inserted. Finally, PTX instructions with mismatched types are generated, like ld.v2.f32 {%fd3, %fd4}, [%rd2] This patch adds the correct actions for vectors of floats, so DAGCombiner would not create loads with extending, and correct code is generated. Patched by Gang Hu. Test Plan: Test case attached. Reviewers: jingyue Reviewed By: jingyue Subscribers: llvm-commits, jholewinski Differential Revision: http://reviews.llvm.org/D10876 llvm-svn: 241191 |
||
---|---|---|
.. | ||
InstPrinter | ||
MCTargetDesc | ||
TargetInfo | ||
cl_common_defines.h | ||
CMakeLists.txt | ||
LLVMBuild.txt | ||
Makefile | ||
ManagedStringPool.h | ||
NVPTX.h | ||
NVPTX.td | ||
NVPTXAllocaHoisting.cpp | ||
NVPTXAllocaHoisting.h | ||
NVPTXAsmPrinter.cpp | ||
NVPTXAsmPrinter.h | ||
NVPTXAssignValidGlobalNames.cpp | ||
NVPTXFavorNonGenericAddrSpaces.cpp | ||
NVPTXFrameLowering.cpp | ||
NVPTXFrameLowering.h | ||
NVPTXGenericToNVVM.cpp | ||
NVPTXImageOptimizer.cpp | ||
NVPTXInstrFormats.td | ||
NVPTXInstrInfo.cpp | ||
NVPTXInstrInfo.h | ||
NVPTXInstrInfo.td | ||
NVPTXIntrinsics.td | ||
NVPTXISelDAGToDAG.cpp | ||
NVPTXISelDAGToDAG.h | ||
NVPTXISelLowering.cpp | ||
NVPTXISelLowering.h | ||
NVPTXLowerAggrCopies.cpp | ||
NVPTXLowerAggrCopies.h | ||
NVPTXLowerAlloca.cpp | ||
NVPTXLowerKernelArgs.cpp | ||
NVPTXMachineFunctionInfo.h | ||
NVPTXMCExpr.cpp | ||
NVPTXMCExpr.h | ||
NVPTXPeephole.cpp | ||
NVPTXPrologEpilogPass.cpp | ||
NVPTXRegisterInfo.cpp | ||
NVPTXRegisterInfo.h | ||
NVPTXRegisterInfo.td | ||
NVPTXReplaceImageHandles.cpp | ||
NVPTXSection.h | ||
NVPTXSubtarget.cpp | ||
NVPTXSubtarget.h | ||
NVPTXTargetMachine.cpp | ||
NVPTXTargetMachine.h | ||
NVPTXTargetObjectFile.h | ||
NVPTXTargetTransformInfo.cpp | ||
NVPTXTargetTransformInfo.h | ||
NVPTXUtilities.cpp | ||
NVPTXUtilities.h | ||
NVPTXVector.td | ||
NVVMReflect.cpp |