2006-10-28 19:04:16 +02:00
|
|
|
; PR925
|
2009-09-09 02:09:15 +02:00
|
|
|
; RUN: llc < %s -march=x86 | \
|
2007-08-15 15:36:28 +02:00
|
|
|
; RUN: grep mov.*str1 | count 1
|
2006-10-28 19:04:16 +02:00
|
|
|
|
2008-02-19 02:41:04 +01:00
|
|
|
target datalayout = "e-p:32:32"
|
2006-10-28 19:04:16 +02:00
|
|
|
target triple = "i686-apple-darwin8.7.2"
|
2008-02-19 02:41:04 +01:00
|
|
|
@str1 = internal constant [5 x i8] c"bonk\00" ; <[5 x i8]*> [#uses=1]
|
|
|
|
@str2 = internal constant [5 x i8] c"bork\00" ; <[5 x i8]*> [#uses=1]
|
|
|
|
@str = internal constant [8 x i8] c"perfwap\00" ; <[8 x i8]*> [#uses=1]
|
2006-10-28 19:04:16 +02:00
|
|
|
|
2008-02-19 02:41:04 +01:00
|
|
|
define void @foo(i32 %C) {
|
2006-10-28 19:04:16 +02:00
|
|
|
entry:
|
2008-02-19 02:41:04 +01:00
|
|
|
switch i32 %C, label %bb2 [
|
|
|
|
i32 1, label %blahaha
|
|
|
|
i32 2, label %blahaha
|
|
|
|
i32 3, label %blahaha
|
|
|
|
i32 4, label %blahaha
|
|
|
|
i32 5, label %blahaha
|
|
|
|
i32 6, label %blahaha
|
|
|
|
i32 7, label %blahaha
|
|
|
|
i32 8, label %blahaha
|
|
|
|
i32 9, label %blahaha
|
|
|
|
i32 10, label %blahaha
|
2006-10-28 19:04:16 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
bb2: ; preds = %entry
|
2008-02-19 02:41:04 +01:00
|
|
|
%tmp5 = and i32 %C, 123 ; <i32> [#uses=1]
|
|
|
|
%tmp = icmp eq i32 %tmp5, 0 ; <i1> [#uses=1]
|
|
|
|
br i1 %tmp, label %blahaha, label %cond_true
|
2006-10-28 19:04:16 +02:00
|
|
|
|
|
|
|
cond_true: ; preds = %bb2
|
|
|
|
br label %blahaha
|
|
|
|
|
|
|
|
blahaha: ; preds = %cond_true, %bb2, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry
|
2008-02-19 02:41:04 +01:00
|
|
|
%s.0 = phi i8* [ getelementptr ([8 x i8]* @str, i32 0, i64 0), %cond_true ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str2, i32 0, i64 0), %bb2 ] ; <i8*> [#uses=13]
|
|
|
|
%tmp8 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
|
|
|
|
%tmp10 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
|
|
|
|
%tmp12 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
|
|
|
|
%tmp14 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
|
|
|
|
%tmp16 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
|
|
|
|
%tmp18 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
|
|
|
|
%tmp20 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
|
|
|
|
%tmp22 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
|
|
|
|
%tmp24 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
|
|
|
|
%tmp26 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
|
|
|
|
%tmp28 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
|
|
|
|
%tmp30 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
|
|
|
|
%tmp32 = tail call i32 (i8*, ...)* @printf( i8* %s.0 ) ; <i32> [#uses=0]
|
2006-10-28 19:04:16 +02:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2008-02-19 02:41:04 +01:00
|
|
|
declare i32 @printf(i8*, ...)
|