1 ; PR925 2 ; RUN: llc < %s -march=x86 | FileCheck %s 3 4 ; CHECK: {{mov.*str1}} 5 ; CHECK-NOT: {{mov.*str1}} 6 7 target datalayout = "e-p:32:32" 8 target triple = "i686-apple-darwin8.7.2" 9 @str1 = internal constant [5 x i8] c"bonk\00" ; <[5 x i8]*> [#uses=1] 10 @str2 = internal constant [5 x i8] c"bork\00" ; <[5 x i8]*> [#uses=1] 11 @str = internal constant [8 x i8] c"perfwap\00" ; <[8 x i8]*> [#uses=1] 12 13 define void @foo(i32 %C) { 14 entry: 15 switch i32 %C, label %bb2 [ 16 i32 1, label %blahaha 17 i32 2, label %blahaha 18 i32 3, label %blahaha 19 i32 4, label %blahaha 20 i32 5, label %blahaha 21 i32 6, label %blahaha 22 i32 7, label %blahaha 23 i32 8, label %blahaha 24 i32 9, label %blahaha 25 i32 10, label %blahaha 26 ] 27 28 bb2: ; preds = %entry 29 %tmp5 = and i32 %C, 123 ; <i32> [#uses=1] 30 %tmp = icmp eq i32 %tmp5, 0 ; <i1> [#uses=1] 31 br i1 %tmp, label %blahaha, label %cond_true 32 33 cond_true: ; preds = %bb2 34 br label %blahaha 35 36 blahaha: ; preds = %cond_true, %bb2, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry 37 %s.0 = phi i8* [ getelementptr ([8 x i8], [8 x i8]* @str, i32 0, i64 0), %cond_true ], [ getelementptr ([5 x i8], [5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8], [5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8], [5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8], [5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8], [5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8], [5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8], [5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8], [5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8], [5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8], [5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8], [5 x i8]* @str2, i32 0, i64 0), %bb2 ] ; <i8*> [#uses=13] 38 %tmp8 = tail call i32 (i8*, ...) @printf( i8* %s.0 ) ; <i32> [#uses=0] 39 %tmp10 = tail call i32 (i8*, ...) @printf( i8* %s.0 ) ; <i32> [#uses=0] 40 %tmp12 = tail call i32 (i8*, ...) @printf( i8* %s.0 ) ; <i32> [#uses=0] 41 %tmp14 = tail call i32 (i8*, ...) @printf( i8* %s.0 ) ; <i32> [#uses=0] 42 %tmp16 = tail call i32 (i8*, ...) @printf( i8* %s.0 ) ; <i32> [#uses=0] 43 %tmp18 = tail call i32 (i8*, ...) @printf( i8* %s.0 ) ; <i32> [#uses=0] 44 %tmp20 = tail call i32 (i8*, ...) @printf( i8* %s.0 ) ; <i32> [#uses=0] 45 %tmp22 = tail call i32 (i8*, ...) @printf( i8* %s.0 ) ; <i32> [#uses=0] 46 %tmp24 = tail call i32 (i8*, ...) @printf( i8* %s.0 ) ; <i32> [#uses=0] 47 %tmp26 = tail call i32 (i8*, ...) @printf( i8* %s.0 ) ; <i32> [#uses=0] 48 %tmp28 = tail call i32 (i8*, ...) @printf( i8* %s.0 ) ; <i32> [#uses=0] 49 %tmp30 = tail call i32 (i8*, ...) @printf( i8* %s.0 ) ; <i32> [#uses=0] 50 %tmp32 = tail call i32 (i8*, ...) @printf( i8* %s.0 ) ; <i32> [#uses=0] 51 ret void 52 } 53 54 declare i32 @printf(i8*, ...) 55