mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 16:31:16 +00:00
d84ea47b89
current form, it is too expensive in compile time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90781 91177308-0d34-0410-b5e6-96231b3b80d8
30 lines
948 B
LLVM
30 lines
948 B
LLVM
; RUN: llc < %s -mtriple=i386-apple-darwin10 -post-RA-scheduler=true | FileCheck %s
|
|
|
|
; PR4958
|
|
|
|
define i32 @main() nounwind ssp {
|
|
entry:
|
|
; CHECK: main:
|
|
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
|
|
br label %bb
|
|
|
|
bb: ; preds = %bb1, %entry
|
|
; CHECK: addl $1
|
|
; CHECK-NEXT: movl %e
|
|
; CHECK-NEXT: adcl $0
|
|
%i.0 = phi i64 [ 0, %entry ], [ %0, %bb1 ] ; <i64> [#uses=1]
|
|
%0 = add nsw i64 %i.0, 1 ; <i64> [#uses=2]
|
|
%1 = icmp sgt i32 0, 0 ; <i1> [#uses=1]
|
|
br i1 %1, label %bb2, label %bb1
|
|
|
|
bb1: ; preds = %bb
|
|
%2 = icmp sle i64 %0, 1 ; <i1> [#uses=1]
|
|
br i1 %2, label %bb, label %bb2
|
|
|
|
bb2: ; preds = %bb1, %bb
|
|
br label %return
|
|
|
|
return: ; preds = %bb2
|
|
ret i32 0
|
|
}
|