All targets expand BR_JT for now.
authorEvan Cheng <evan.cheng@apple.com>
Mon, 30 Oct 2006 08:02:39 +0000 (08:02 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 30 Oct 2006 08:02:39 +0000 (08:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31294 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMISelDAGToDAG.cpp
lib/Target/Alpha/AlphaISelLowering.cpp
lib/Target/IA64/IA64ISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/Sparc/SparcISelDAGToDAG.cpp
lib/Target/X86/X86ISelLowering.cpp

index 7221818d1752784286a6697916232fafca274c37..3674bf1f693f33e6fea1f44ecc905806e8f07387 100644 (file)
@@ -73,7 +73,8 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
 
   setOperationAction(ISD::MEMSET, MVT::Other, Expand);
 
-  setOperationAction(ISD::BRIND, MVT::i32, Expand);
+  setOperationAction(ISD::BR_JT, MVT::Other, Expand);
+  setOperationAction(ISD::BRIND, MVT::Other, Expand);
   setOperationAction(ISD::BR_CC, MVT::i32, Custom);
   setOperationAction(ISD::BR_CC, MVT::f32, Custom);
   setOperationAction(ISD::BR_CC, MVT::f64, Custom);
index f5372e126c3b11b4d161bde224003169ac2ccd46..cfc99957c72b94401337571d5a80dbd932c7862c 100644 (file)
@@ -62,7 +62,8 @@ AlphaTargetLowering::AlphaTargetLowering(TargetMachine &TM) : TargetLowering(TM)
 
   setStoreXAction(MVT::i1, Promote);
   
-  //  setOperationAction(ISD::BRIND,        MVT::i64,   Expand);
+  //  setOperationAction(ISD::BRIND,        MVT::Other,   Expand);
+  setOperationAction(ISD::BR_JT,        MVT::Other, Expand);
   setOperationAction(ISD::BR_CC,        MVT::Other, Expand);
   setOperationAction(ISD::SELECT_CC,    MVT::Other, Expand);  
 
index 83894eebdbf80f2bb1d919faa8c2f79aa24a6ccc..e9176e1bf28ad56952d35168596abdf65307bc10 100644 (file)
@@ -44,7 +44,8 @@ IA64TargetLowering::IA64TargetLowering(TargetMachine &TM)
       setLoadXAction(ISD::SEXTLOAD         , MVT::i16  , Expand);
       setLoadXAction(ISD::SEXTLOAD         , MVT::i32  , Expand);
 
-      setOperationAction(ISD::BRIND            , MVT::i64,   Expand);
+      setOperationAction(ISD::BRIND            , MVT::Other, Expand);
+      setOperationAction(ISD::BR_JT            , MVT::Other, Expand);
       setOperationAction(ISD::BR_CC            , MVT::Other, Expand);
       setOperationAction(ISD::FP_ROUND_INREG   , MVT::f32  , Expand);
 
index 4285b682b6b78a37acfc695df1c1719ea08e7b18..df4e9acfa7461c5d95b593c3c07ee42af57f0b36 100644 (file)
@@ -107,6 +107,8 @@ PPCTargetLowering::PPCTargetLowering(TargetMachine &TM)
   
   // PowerPC does not have BRCOND which requires SetCC
   setOperationAction(ISD::BRCOND, MVT::Other, Expand);
+
+  setOperationAction(ISD::BR_JT,  MVT::Other, Expand);
   
   // PowerPC turns FP_TO_SINT into FCTIWZ and some load/stores.
   setOperationAction(ISD::FP_TO_SINT, MVT::i32, Custom);
index 299cf06c4380f3e3eb71b6fb4f31f51a6eb73faa..e6e036943bd3be9fa2606fde47f4b08b7336ff6c 100644 (file)
@@ -174,7 +174,8 @@ SparcTargetLowering::SparcTargetLowering(TargetMachine &TM)
   
   // Sparc doesn't have BRCOND either, it has BR_CC.
   setOperationAction(ISD::BRCOND, MVT::Other, Expand);
-  setOperationAction(ISD::BRIND, MVT::i32, Expand);
+  setOperationAction(ISD::BRIND, MVT::Other, Expand);
+  setOperationAction(ISD::BR_JT, MVT::Other, Expand);
   setOperationAction(ISD::BR_CC, MVT::i32, Custom);
   setOperationAction(ISD::BR_CC, MVT::f32, Custom);
   setOperationAction(ISD::BR_CC, MVT::f64, Custom);
index d442a18850b4e90ab79d00e5af692b7730647615..0b8550686c3e0ae77423d093443d1c0f3ec0d69d 100644 (file)
@@ -146,6 +146,7 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM)
   setOperationAction(ISD::BIT_CONVERT      , MVT::f32  , Expand);
   setOperationAction(ISD::BIT_CONVERT      , MVT::i32  , Expand);
 
+  setOperationAction(ISD::BR_JT            , MVT::Other, Expand);
   setOperationAction(ISD::BRCOND           , MVT::Other, Custom);
   setOperationAction(ISD::BR_CC            , MVT::Other, Expand);
   setOperationAction(ISD::SELECT_CC        , MVT::Other, Expand);