[llvm-commits] [llvm] r130354 - /llvm/trunk/lib/Target/PTX/PTXISelLowering.cpp
Justin Holewinski
justin.holewinski at gmail.com
Wed Apr 27 17:19:52 PDT 2011
Author: jholewinski
Date: Wed Apr 27 19:19:52 2011
New Revision: 130354
URL: http://llvm.org/viewvc/llvm-project?rev=130354&view=rev
Log:
PTX: support for zext loads and trunc stores
- expansion of EXTLOAD and TRUNCSTORE instructions
Patch by Dan Bailey
Modified:
llvm/trunk/lib/Target/PTX/PTXISelLowering.cpp
Modified: llvm/trunk/lib/Target/PTX/PTXISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXISelLowering.cpp?rev=130354&r1=130353&r2=130354&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/PTX/PTXISelLowering.cpp Wed Apr 27 19:19:52 2011
@@ -34,11 +34,23 @@
addRegisterClass(MVT::f32, PTX::RRegf32RegisterClass);
addRegisterClass(MVT::f64, PTX::RRegf64RegisterClass);
+ setBooleanContents(ZeroOrOneBooleanContent);
+
setOperationAction(ISD::EXCEPTIONADDR, MVT::i32, Expand);
setOperationAction(ISD::ConstantFP, MVT::f32, Legal);
setOperationAction(ISD::ConstantFP, MVT::f64, Legal);
-
+
+ // Turn i16 (z)extload into load + (z)extend
+ setLoadExtAction(ISD::EXTLOAD, MVT::i16, Expand);
+ setLoadExtAction(ISD::ZEXTLOAD, MVT::i16, Expand);
+
+ // Turn f32 extload into load + fextend
+ setLoadExtAction(ISD::EXTLOAD, MVT::f32, Expand);
+
+ // Turn f64 truncstore into trunc + store.
+ setTruncStoreAction(MVT::f64, MVT::f32, Expand);
+
// Customize translation of memory addresses
setOperationAction(ISD::GlobalAddress, MVT::i32, Custom);
setOperationAction(ISD::GlobalAddress, MVT::i64, Custom);
More information about the llvm-commits
mailing list