mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Revert LoopStrengthReduce.cpp to pre-r94061 for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94123 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
; RUN: llc -march=x86-64 < %s -o - | grep {cmpl \\$\[1\], %}
|
||||
; RUN: opt < %s -loop-reduce -S | grep ugt
|
||||
; PR2535
|
||||
|
||||
@.str = internal constant [4 x i8] c"%d\0A\00"
|
||||
|
||||
@ -15,7 +16,7 @@ forbody:
|
||||
%add166 = or i32 %mul15, 1 ; <i32> [#uses=1] *
|
||||
call i32 (i8*, ...)* @printf( i8* noalias getelementptr ([4 x i8]* @.str, i32 0, i32 0), i32 %add166 ) nounwind
|
||||
%inc = add i32 %i.0, 1 ; <i32> [#uses=3]
|
||||
%cmp = icmp ne i32 %inc, 1027 ; <i1> [#uses=1]
|
||||
%cmp = icmp ult i32 %inc, 1027 ; <i1> [#uses=1]
|
||||
br i1 %cmp, label %forbody, label %afterfor
|
||||
|
||||
afterfor: ; preds = %forcond
|
||||
|
@ -1,9 +1,10 @@
|
||||
; RUN: llc < %s -o - | grep {testl %ecx, %ecx}
|
||||
; RUN: llc %s -o - --x86-asm-syntax=att | grep {cmpl \$4}
|
||||
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
|
||||
target triple = "x86_64-apple-darwin9"
|
||||
|
||||
; The comparison happens before the relevant use, but it can still be rewritten
|
||||
; to compare with zero.
|
||||
; This is like change-compare-stride-trickiness-1.ll except the comparison
|
||||
; happens before the relevant use, so the comparison stride can't be
|
||||
; easily changed.
|
||||
|
||||
define void @foo() nounwind {
|
||||
entry:
|
||||
|
@ -19,7 +19,7 @@ bb3: ; preds = %bb1
|
||||
%tmp4 = add i32 %c_addr.1, -1 ; <i32> [#uses=1]
|
||||
%c_addr.1.be = select i1 %tmp2, i32 %tmp3, i32 %tmp4 ; <i32> [#uses=1]
|
||||
%indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1]
|
||||
; CHECK: add i32 %lsr.iv, -1
|
||||
; CHECK: sub i32 %lsr.iv, 1
|
||||
br label %bb6
|
||||
|
||||
bb6: ; preds = %bb3, %entry
|
||||
|
Reference in New Issue
Block a user