[llvm-commits] [llvm] r159538 - in /llvm/trunk: lib/Target/ARM/ARMInstrThumb2.td test/CodeGen/Thumb2/thumb2-ror.ll
Bob Wilson
bob.wilson at apple.com
Mon Jul 2 10:22:47 PDT 2012
Author: bwilson
Date: Mon Jul 2 12:22:47 2012
New Revision: 159538
URL: http://llvm.org/viewvc/llvm-project?rev=159538&view=rev
Log:
Do not attempt to use ROR for Thumb1.
Patch by Matt Fischer!
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
llvm/trunk/test/CodeGen/Thumb2/thumb2-ror.ll
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=159538&r1=159537&r2=159538&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Mon Jul 2 12:22:47 2012
@@ -2161,8 +2161,8 @@
BinOpFrag<(rotr node:$LHS, node:$RHS)>, "t2ROR">;
// (rotr x, (and y, 0x...1f)) ==> (ROR x, y)
-def : Pat<(rotr rGPR:$lhs, (and rGPR:$rhs, lo5AllOne)),
- (t2RORrr rGPR:$lhs, rGPR:$rhs)>;
+def : T2Pat<(rotr rGPR:$lhs, (and rGPR:$rhs, lo5AllOne)),
+ (t2RORrr rGPR:$lhs, rGPR:$rhs)>;
let Uses = [CPSR] in {
def t2RRX : T2sTwoReg<(outs rGPR:$Rd), (ins rGPR:$Rm), IIC_iMOVsi,
Modified: llvm/trunk/test/CodeGen/Thumb2/thumb2-ror.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/thumb2-ror.ll?rev=159538&r1=159537&r2=159538&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Thumb2/thumb2-ror.ll (original)
+++ llvm/trunk/test/CodeGen/Thumb2/thumb2-ror.ll Mon Jul 2 12:22:47 2012
@@ -1,5 +1,5 @@
; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
-
+; RUN: llc < %s -march=thumb | FileCheck %s -check-prefix=THUMB1
; CHECK: f1:
; CHECK: ror.w r0, r0, #22
@@ -13,6 +13,8 @@
; CHECK: f2:
; CHECK-NOT: and
; CHECK: ror
+; THUMB1: f2
+; THUMB1: and
define i32 @f2(i32 %v, i32 %nbits) {
entry:
%and = and i32 %nbits, 31
@@ -21,4 +23,4 @@
%shl = shl i32 %v, %sub
%or = or i32 %shl, %shr
ret i32 %or
-}
\ No newline at end of file
+}
More information about the llvm-commits
mailing list