Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -O2 -march=x86 -mtriple=i386-pc-linux-gnu -relocation-model=pic | FileCheck %s
      2 ; PR9237: Assertion in VirtRegRewriter.cpp, ResurrectConfirmedKill
      3 ;         `KillOps[*SR] == KillOp && "invalid subreg kill flags"'
      4 
      5 %t = type { i32 }
      6 
      7 define i32 @foo(%t* %s) nounwind {
      8 entry:
      9   br label %if.then735
     10 
     11 if.then735:
     12   %call747 = call i32 undef(%t* %s, i8* null, i8* undef, i32 128, i8* undef, i32 516) nounwind
     13   br i1 undef, label %if.then751, label %if.then758
     14 
     15 if.then751:
     16   unreachable
     17 
     18 if.then758:
     19   %add761 = add i32 %call747, 4
     20   %add763 = add i32 %add761, %call747
     21   %add.ptr768 = getelementptr inbounds [516 x i8]* null, i32 0, i32 %add761
     22   br i1 undef, label %cond.false783, label %cond.true771
     23 
     24 cond.true771:
     25   %call782 = call i8* @__memmove_chk(i8* %add.ptr768, i8* undef, i32 %call747, i32 undef)
     26   br label %cond.end791
     27 
     28 ; CHECK: calll __memmove_chk
     29 cond.false783:
     30   %call.i1035 = call i8* @__memmove_chk(i8* %add.ptr768, i8* undef, i32 %call747, i32 undef) nounwind
     31   br label %cond.end791
     32 
     33 cond.end791:
     34   %conv801 = trunc i32 %call747 to i8
     35   %add.ptr822.sum = add i32 %call747, 3
     36   %arrayidx833 = getelementptr inbounds [516 x i8]* null, i32 0, i32 %add.ptr822.sum
     37   store i8 %conv801, i8* %arrayidx833, align 1
     38   %cmp841 = icmp eq i8* undef, null
     39   br i1 %cmp841, label %if.end849, label %if.then843
     40 
     41 if.then843:
     42   unreachable
     43 
     44 if.end849:
     45   %call921 = call i32 undef(%t* %s, i8* undef, i8* undef, i32 %add763) nounwind
     46   unreachable
     47 
     48 }
     49 
     50 declare i8* @__memmove_chk(i8*, i8*, i32, i32) nounwind
     51