1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
2 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s
4 target datalayout = "e-p:32:32"
5 target triple = "i686-pc-linux-gnu"
7 declare void @takes_i32(i32)
8 declare void @takes_i32_inalloca(ptr inalloca(i32))
11 ; CHECK-LABEL: define void @f() {
12 ; CHECK-NEXT: [[ARGS:%.*]] = alloca inalloca i32, align 4
13 ; CHECK-NEXT: call void @takes_i32(ptr nonnull inalloca(i32) [[ARGS]])
14 ; CHECK-NEXT: ret void
16 %args = alloca inalloca i32
17 call void @takes_i32(ptr inalloca(i32) %args)
22 ; CHECK-LABEL: define void @g() {
23 ; CHECK-NEXT: call void @takes_i32_inalloca(i32 0)
24 ; CHECK-NEXT: ret void
26 call void @takes_i32_inalloca(i32 0)