Home | History | Annotate | Download | only in X86
      1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
      2 ; RUN: llc -mtriple x86_64-unknown-linux-gnu < %s | FileCheck %s
      3 
      4 define void @main() {
      5 ; CHECK-LABEL: main:
      6 ; CHECK:       # %bb.0: # %entry
      7 ; CHECK-NEXT:    subq $424, %rsp # imm = 0x1A8
      8 ; CHECK-NEXT:    .cfi_def_cfa_offset 432
      9 ; CHECK-NEXT:    leaq {{[0-9]+}}(%rsp), %rdi
     10 ; CHECK-NEXT:    xorl %esi, %esi
     11 ; CHECK-NEXT:    movl $400, %edx # imm = 0x190
     12 ; CHECK-NEXT:    callq memset
     13 ; CHECK-NEXT:    movl {{[0-9]+}}(%rsp), %eax
     14 ; CHECK-NEXT:    movl (%rax), %ecx
     15 ; CHECK-NEXT:    addl 0, %eax
     16 ; CHECK-NEXT:    addl %ecx, %eax
     17 ; CHECK-NEXT:    addl %ecx, %eax
     18 ; CHECK-NEXT:    addl {{[0-9]+}}(%rsp), %eax
     19 ; CHECK-NEXT:    movl %eax, {{[0-9]+}}(%rsp)
     20 ; CHECK-NEXT:    movl {{[0-9]+}}(%rsp), %eax
     21 ; CHECK-NEXT:    movl %eax, %ecx
     22 ; CHECK-NEXT:    imull %eax, %ecx
     23 ; CHECK-NEXT:    subl %ecx, %eax
     24 ; CHECK-NEXT:    movl %eax, (%rax)
     25 entry:
     26   %k = alloca i32, align 4
     27   %m = alloca i32, align 4
     28   %a = alloca [100 x i32], align 16
     29   %0 = bitcast [100 x i32]* %a to i8*
     30   call void @llvm.memset.p0i8.i64(i8* nonnull align 16 %0, i8 0, i64 400, i1 false)
     31   %arrayidx = getelementptr inbounds [100 x i32], [100 x i32]* %a, i64 0, i64 34
     32   %add = load i32, i32* %k
     33   %1 = load i32, i32* null
     34   %2 = load i32, i32* undef
     35   %3 = load i32, i32* undef
     36   %4 = load i32, i32* %arrayidx
     37   %5 = load i32, i32* undef
     38   %6 = load i32, i32* undef
     39   %7 = load i32, i32* undef
     40   %8 = load i32, i32* undef
     41   %9 = load i32, i32* undef
     42   %10 = load i32, i32* undef
     43   %11 = load i32, i32* undef
     44   %12 = load i32, i32* undef
     45   %13 = load i32, i32* undef
     46   %14 = load i32, i32* undef
     47   %15 = load i32, i32* undef
     48   %16 = load i32, i32* undef
     49   %add.1 = add i32 %add, %1
     50   %add.2 = add i32 %add.1, %2
     51   %add.3 = add i32 %add.2, %3
     52   %add.4 = add i32 %add.3, %4
     53   store i32 %add.4, i32* %k
     54   %17 = load i32, i32* %m
     55   %mul = mul i32 %17, %17
     56   %sub = sub i32 %17, %mul
     57   store i32 %sub, i32* undef
     58   unreachable
     59 }
     60 
     61 declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1) #0
     62 
     63 attributes #0 = { argmemonly nounwind }
     64