[llvm-commits] [llvm] r157972 - in /llvm/trunk: lib/Target/ARM/ARMInstrThumb2.td test/CodeGen/ARM/bicNoZext.ll

Joel Jones joel_k_jones at apple.com
Mon Jun 4 17:47:21 PDT 2012


Author: joel_k_jones
Date: Mon Jun  4 19:47:21 2012
New Revision: 157972

URL: http://llvm.org/viewvc/llvm-project?rev=157972&view=rev
Log:
Revert commit r157966

Removed:
    llvm/trunk/test/CodeGen/ARM/bicNoZext.ll
Modified:
    llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td

Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=157972&r1=157971&r2=157972&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Mon Jun  4 19:47:21 2012
@@ -62,14 +62,6 @@
   return CurDAG->getTargetConstant(-((int)N->getZExtValue()), MVT::i32);
 }]>;
 
-// so_imm_not_sext_XFORM - Return a so_imm value packed into the format
-// described for so_imm_not_sext def below.
-def t2_so_imm_not_sext_XFORM : SDNodeXForm<imm, [{
-  APInt apIntN = N->getAPIntValue();
-  unsigned N16bitSignExt = apIntN.trunc(16).sext(32).getZExtValue();
-  return CurDAG->getTargetConstant(~N16bitSignExt, MVT::i32);
-}]>;
-
 // t2_so_imm - Match a 32-bit immediate operand, which is an
 // 8-bit immediate rotated by an arbitrary number of bits, or an 8-bit
 // immediate splatted into multiple bytes of the word.
@@ -94,17 +86,6 @@
   let ParserMatchClass = t2_so_imm_not_asmoperand;
 }
 
-// t2_so_imm_not_sext - Match an immediate that when zero-extended
-// from 16-bits to 32-bits is a complement of a t2_so_imm.
-def t2_so_imm_not_sext : Operand<i32>, PatLeaf<(imm), [{
-    APInt apIntN = N->getAPIntValue();
-    if (!apIntN.isIntN(16)) return false;
-    unsigned N16bitSignExt = apIntN.trunc(16).sext(32).getZExtValue();
-    return ARM_AM::getT2SOImmVal(~N16bitSignExt) != -1;
-  }], t2_so_imm_not_sext_XFORM> {
-  let ParserMatchClass = t2_so_imm_not_asmoperand;
-}
-
 // t2_so_imm_neg - Match an immediate that is a negation of a t2_so_imm.
 def t2_so_imm_neg_asmoperand : AsmOperandClass { let Name = "T2SOImmNeg"; }
 def t2_so_imm_neg : Operand<i32>, PatLeaf<(imm), [{
@@ -2351,11 +2332,6 @@
 def : T2Pat<(and     rGPR:$src, t2_so_imm_not:$imm),
             (t2BICri rGPR:$src, t2_so_imm_not:$imm)>;
 
-// so_imm_not_sext is needed instead of so_imm_not, as the value of imm
-// will match the original bitWidth for $src.
-def : T2Pat<(and rGPR:$src, t2_so_imm_not_sext:$imm),
-            (t2BICri rGPR:$src, t2_so_imm_not_sext:$imm)>;
-
 // FIXME: Disable this pattern on Darwin to workaround an assembler bug.
 def : T2Pat<(or      rGPR:$src, t2_so_imm_not:$imm),
             (t2ORNri rGPR:$src, t2_so_imm_not:$imm)>,

Removed: llvm/trunk/test/CodeGen/ARM/bicNoZext.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/bicNoZext.ll?rev=157971&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/bicNoZext.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/bicNoZext.ll (removed)
@@ -1,19 +0,0 @@
-; RUN: llc %s -o - | FileCheck %s
-; ModuleID = 'bic.c'
-target triple = "thumbv7-apple-ios3.0.0"
-
-define zeroext i16 @foo16(i16 zeroext %f) nounwind readnone optsize ssp {
-entry:
-  ; CHECK: .thumb_func	_foo16
-  ; CHECK: {{bic[^#]*#3}}
-  %and = and i16 %f, -4
-  ret i16 %and
-}
-
-define i32 @foo32(i32 %f) nounwind readnone optsize ssp {
-entry:
-  ; CHECK: .thumb_func	_foo32
-  ; CHECK: {{bic[^#]*#3}}
-  %and = and i32 %f, -4
-  ret i32 %and
-}





More information about the llvm-commits mailing list