summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-08-31 02:59:23 +0000
committerBill Wendling <isanbard@gmail.com>2008-08-31 02:59:23 +0000
commitaebd2662d3c28a2b7bacae6938ccdd75e7f7961e (patch)
tree0e39c90d2cc3732388b7765d07226f6ac8592ba9
parent62cf24343c80e7b59d79d39e8aa50af817a04062 (diff)
downloadbcm5719-llvm-aebd2662d3c28a2b7bacae6938ccdd75e7f7961e.tar.gz
bcm5719-llvm-aebd2662d3c28a2b7bacae6938ccdd75e7f7961e.zip
Revert the "XFAIL" for the rotate_ops.ll testcase. Instead, mark ISD::ROTR
instructions in CellSPU as "Expand" so that they won't be generated. I added a "FIXME" so that this hack can be addressed and reverted once ISD::ROTR is supported in the .td files. llvm-svn: 55582
-rw-r--r--llvm/lib/Target/CellSPU/SPUISelLowering.cpp10
-rw-r--r--llvm/test/CodeGen/CellSPU/rotate_ops.ll5
2 files changed, 7 insertions, 8 deletions
diff --git a/llvm/lib/Target/CellSPU/SPUISelLowering.cpp b/llvm/lib/Target/CellSPU/SPUISelLowering.cpp
index 4e93ea14b1c..72fad2c13be 100644
--- a/llvm/lib/Target/CellSPU/SPUISelLowering.cpp
+++ b/llvm/lib/Target/CellSPU/SPUISelLowering.cpp
@@ -202,9 +202,13 @@ SPUTargetLowering::SPUTargetLowering(SPUTargetMachine &TM)
// SPU can do rotate right and left, so legalize it... but customize for i8
// because instructions don't exist.
- setOperationAction(ISD::ROTR, MVT::i32, Legal);
- setOperationAction(ISD::ROTR, MVT::i16, Legal);
- setOperationAction(ISD::ROTR, MVT::i8, Custom);
+
+ // FIXME: Change from "expand" to appropriate type once ROTR is supported in
+ // .td files.
+ setOperationAction(ISD::ROTR, MVT::i32, Expand /*Legal*/);
+ setOperationAction(ISD::ROTR, MVT::i16, Expand /*Legal*/);
+ setOperationAction(ISD::ROTR, MVT::i8, Expand /*Custom*/);
+
setOperationAction(ISD::ROTL, MVT::i32, Legal);
setOperationAction(ISD::ROTL, MVT::i16, Legal);
setOperationAction(ISD::ROTL, MVT::i8, Custom);
diff --git a/llvm/test/CodeGen/CellSPU/rotate_ops.ll b/llvm/test/CodeGen/CellSPU/rotate_ops.ll
index 9c7ebeb97dd..e308172486a 100644
--- a/llvm/test/CodeGen/CellSPU/rotate_ops.ll
+++ b/llvm/test/CodeGen/CellSPU/rotate_ops.ll
@@ -8,11 +8,6 @@
; RUN grep rothi.*,.3 %t1.s | count 1
; RUN: grep andhi %t1.s | count 4
; RUN: grep shlhi %t1.s | count 4
-; XFAIL: *
-
-;; FIXME: ROTR hasn't been implemented in CellSPU! It's marked as a "legal"
-;; operation, but if used, the code generator complains that it can't
-;; be selected.
target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128"
target triple = "spu"
OpenPOWER on IntegriCloud