aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Holewinski <justin.holewinski@gmail.com>2011-09-26 18:57:24 +0000
committerJustin Holewinski <justin.holewinski@gmail.com>2011-09-26 18:57:24 +0000
commitc3edaddfea75ed6aeef3a57f05c8c0a2439c1793 (patch)
tree4030dea82b4cff8e9bcc489a9deaba373dae5f43
parent1395cf8423a2045abc6db778eb674dd663aea636 (diff)
downloadllvm-c3edaddfea75ed6aeef3a57f05c8c0a2439c1793.zip
llvm-c3edaddfea75ed6aeef3a57f05c8c0a2439c1793.tar.gz
llvm-c3edaddfea75ed6aeef3a57f05c8c0a2439c1793.tar.bz2
PTX: Implement ISD::ANY_EXTEND
llvm-svn: 140548
-rw-r--r--llvm/lib/Target/PTX/PTXInstrInfo.td12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/PTX/PTXInstrInfo.td b/llvm/lib/Target/PTX/PTXInstrInfo.td
index 94f88de..a33bd23 100644
--- a/llvm/lib/Target/PTX/PTXInstrInfo.td
+++ b/llvm/lib/Target/PTX/PTXInstrInfo.td
@@ -849,6 +849,18 @@ def CVT_f64_f32
: InstPTX<(outs RegF64:$d), (ins RegF32:$a), "cvt.f64.f32\t$d, $a",
[(set RegF64:$d, (fextend RegF32:$a))]>;
+// NOTE: These are temporarily here to help test some Clang-generated code.
+// We really need to properly introduce anyext and bitconvert into the back-end.
+// ANY_EXTEND
+def ANY_EXTEND_I64_I32
+ : InstPTX<(outs RegI64:$d), (ins RegI32:$a), "cvt.u64.u32\t$d, $a",
+ [(set RegI64:$d, (anyext RegI32:$a))]>;
+
+// BITCAST
+def BITCAST_I32_F32
+ : InstPTX<(outs RegI32:$d), (ins RegF32:$a), "mov.b32\t$d, $a",
+ [(set RegI32:$d, (bitconvert RegF32:$a))]>;
+
///===- Control Flow Instructions -----------------------------------------===//
let isBranch = 1, isTerminator = 1, isBarrier = 1 in {