1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -verify -iroutliner -ir-outlining-no-cost -no-ir-sim-intrinsics < %s | FileCheck %s
4 ; This test checks that we do not outline memset intrinsics since it requires
5 ; extra address space checks.
7 declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i32, i1)
9 define i64 @function1(i64 %x, i64 %z, i64 %n) {
10 ; CHECK-LABEL: @function1(
12 ; CHECK-NEXT: [[POOL:%.*]] = alloca [59 x i64], align 4
13 ; CHECK-NEXT: [[TMP:%.*]] = bitcast [59 x i64]* [[POOL]] to i8*
14 ; CHECK-NEXT: call void @llvm.memset.p0i8.i64(i8* nonnull align 4 [[TMP]], i8 0, i64 236, i1 false)
15 ; CHECK-NEXT: call void @outlined_ir_func_0(i64 [[N:%.*]], i64 [[X:%.*]], i64 [[Z:%.*]])
16 ; CHECK-NEXT: ret i64 0
19 %pool = alloca [59 x i64], align 4
20 %tmp = bitcast [59 x i64]* %pool to i8*
21 call void @llvm.memset.p0i8.i64(i8* nonnull %tmp, i8 0, i64 236, i32 4, i1 false)
22 %cmp3 = icmp eq i64 %n, 0
28 define i64 @function2(i64 %x, i64 %z, i64 %n) {
29 ; CHECK-LABEL: @function2(
31 ; CHECK-NEXT: [[POOL:%.*]] = alloca [59 x i64], align 4
32 ; CHECK-NEXT: [[TMP:%.*]] = bitcast [59 x i64]* [[POOL]] to i8*
33 ; CHECK-NEXT: call void @llvm.memset.p0i8.i64(i8* nonnull align 4 [[TMP]], i8 0, i64 236, i1 false)
34 ; CHECK-NEXT: call void @outlined_ir_func_0(i64 [[N:%.*]], i64 [[X:%.*]], i64 [[Z:%.*]])
35 ; CHECK-NEXT: ret i64 0
38 %pool = alloca [59 x i64], align 4
39 %tmp = bitcast [59 x i64]* %pool to i8*
40 call void @llvm.memset.p0i8.i64(i8* nonnull %tmp, i8 0, i64 236, i32 4, i1 false)
41 %cmp3 = icmp eq i64 %n, 0