From 63bce90c0dd68bba47c2d997c63fe6951eb2dfbf Mon Sep 17 00:00:00 2001 From: Justin Holewinski Date: Mon, 26 Sep 2011 18:57:24 +0000 Subject: [PATCH] PTX: Implement ISD::ANY_EXTEND git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140548 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PTX/PTXInstrInfo.td | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/Target/PTX/PTXInstrInfo.td b/lib/Target/PTX/PTXInstrInfo.td index 94f88de95b0..a33bd239ba2 100644 --- a/lib/Target/PTX/PTXInstrInfo.td +++ b/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 { -- 2.34.1