Skip to content

Commit 2a02d57

Browse files
authored
[IR] Mark vector intrinsics speculatable (#162334)
The vector intrinsics in question have no undefined behavior, and have no other effect besides returning the result: they should hence be marked speculatable.
1 parent 69f2de1 commit 2a02d57

File tree

10 files changed

+954
-767
lines changed

10 files changed

+954
-767
lines changed

clang/test/CodeGen/AArch64/sme-intrinsics/acle_sme_ld1_vnum.c

Lines changed: 172 additions & 172 deletions
Large diffs are not rendered by default.

clang/test/CodeGen/AArch64/sme-intrinsics/acle_sme_st1_vnum.c

Lines changed: 172 additions & 172 deletions
Large diffs are not rendered by default.

clang/test/CodeGen/AArch64/sve2p1-intrinsics/acle_sve2p1_ld1.c

Lines changed: 96 additions & 96 deletions
Large diffs are not rendered by default.

clang/test/CodeGen/AArch64/sve2p1-intrinsics/acle_sve2p1_ldnt1.c

Lines changed: 96 additions & 96 deletions
Large diffs are not rendered by default.

clang/test/CodeGen/AArch64/sve2p1-intrinsics/acle_sve2p1_st1.c

Lines changed: 96 additions & 96 deletions
Large diffs are not rendered by default.

clang/test/CodeGen/AArch64/sve2p1-intrinsics/acle_sve2p1_stnt1.c

Lines changed: 96 additions & 96 deletions
Large diffs are not rendered by default.

llvm/include/llvm/IR/Intrinsics.td

Lines changed: 49 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,16 +1983,16 @@ def int_experimental_vector_match : DefaultAttrsIntrinsic<
19831983
[ llvm_anyvector_ty,
19841984
llvm_anyvector_ty,
19851985
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty> ], // Mask
1986-
[ IntrNoMem ]>;
1986+
[ IntrNoMem, IntrSpeculatable ]>;
19871987

19881988
// Extract based on mask bits
19891989
def int_experimental_vector_extract_last_active:
19901990
DefaultAttrsIntrinsic<[LLVMVectorElementType<0>],
19911991
[llvm_anyvector_ty, LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
1992-
LLVMVectorElementType<0>], [IntrNoMem]>;
1992+
LLVMVectorElementType<0>], [IntrNoMem, IntrSpeculatable]>;
19931993

19941994
// Operators
1995-
let IntrProperties = [IntrNoMem] in {
1995+
let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
19961996
// Integer arithmetic
19971997
def int_vp_add : DefaultAttrsIntrinsic<[ llvm_anyvector_ty ],
19981998
[ LLVMMatchType<0>,
@@ -2039,26 +2039,6 @@ let IntrProperties = [IntrNoMem] in {
20392039
LLVMMatchType<0>,
20402040
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
20412041
llvm_i32_ty]>;
2042-
def int_vp_sdiv : DefaultAttrsIntrinsic<[ llvm_anyvector_ty ],
2043-
[ LLVMMatchType<0>,
2044-
LLVMMatchType<0>,
2045-
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
2046-
llvm_i32_ty]>;
2047-
def int_vp_udiv : DefaultAttrsIntrinsic<[ llvm_anyvector_ty ],
2048-
[ LLVMMatchType<0>,
2049-
LLVMMatchType<0>,
2050-
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
2051-
llvm_i32_ty]>;
2052-
def int_vp_srem : DefaultAttrsIntrinsic<[ llvm_anyvector_ty ],
2053-
[ LLVMMatchType<0>,
2054-
LLVMMatchType<0>,
2055-
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
2056-
llvm_i32_ty]>;
2057-
def int_vp_urem : DefaultAttrsIntrinsic<[ llvm_anyvector_ty ],
2058-
[ LLVMMatchType<0>,
2059-
LLVMMatchType<0>,
2060-
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
2061-
llvm_i32_ty]>;
20622042
def int_vp_abs : DefaultAttrsIntrinsic<[ llvm_anyvector_ty ],
20632043
[ LLVMMatchType<0>,
20642044
llvm_i1_ty,
@@ -2390,7 +2370,29 @@ let IntrProperties = [IntrNoMem] in {
23902370
llvm_i32_ty]>;
23912371
}
23922372

2393-
let IntrProperties = [IntrNoMem, ImmArg<ArgIndex<1>>] in {
2373+
// Integer VP division and remainder: not speculatable.
2374+
def int_vp_sdiv : DefaultAttrsIntrinsic<[ llvm_anyvector_ty ],
2375+
[ LLVMMatchType<0>,
2376+
LLVMMatchType<0>,
2377+
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
2378+
llvm_i32_ty], [IntrNoMem]>;
2379+
def int_vp_udiv : DefaultAttrsIntrinsic<[ llvm_anyvector_ty ],
2380+
[ LLVMMatchType<0>,
2381+
LLVMMatchType<0>,
2382+
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
2383+
llvm_i32_ty], [IntrNoMem]>;
2384+
def int_vp_srem : DefaultAttrsIntrinsic<[ llvm_anyvector_ty ],
2385+
[ LLVMMatchType<0>,
2386+
LLVMMatchType<0>,
2387+
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
2388+
llvm_i32_ty], [IntrNoMem]>;
2389+
def int_vp_urem : DefaultAttrsIntrinsic<[ llvm_anyvector_ty ],
2390+
[ LLVMMatchType<0>,
2391+
LLVMMatchType<0>,
2392+
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
2393+
llvm_i32_ty], [IntrNoMem]>;
2394+
2395+
let IntrProperties = [IntrNoMem, IntrSpeculatable, ImmArg<ArgIndex<1>>] in {
23942396
def int_vp_ctlz : DefaultAttrsIntrinsic<[ llvm_anyvector_ty ],
23952397
[ LLVMMatchType<0>,
23962398
llvm_i1_ty,
@@ -2422,18 +2424,18 @@ def int_loop_dependence_war_mask:
24222424
def int_get_active_lane_mask:
24232425
DefaultAttrsIntrinsic<[llvm_anyvector_ty],
24242426
[llvm_anyint_ty, LLVMMatchType<1>],
2425-
[IntrNoMem]>;
2427+
[IntrNoMem, IntrSpeculatable]>;
24262428

24272429
def int_experimental_get_vector_length:
24282430
DefaultAttrsIntrinsic<[llvm_i32_ty],
24292431
[llvm_anyint_ty, llvm_i32_ty, llvm_i1_ty],
2430-
[IntrNoMem,
2432+
[IntrNoMem, IntrSpeculatable,
24312433
ImmArg<ArgIndex<1>>, ImmArg<ArgIndex<2>>]>;
24322434

24332435
def int_experimental_cttz_elts:
24342436
DefaultAttrsIntrinsic<[llvm_anyint_ty],
24352437
[llvm_anyvector_ty, llvm_i1_ty],
2436-
[IntrNoMem, ImmArg<ArgIndex<1>>]>;
2438+
[IntrNoMem, IntrSpeculatable, ImmArg<ArgIndex<1>>]>;
24372439

24382440
def int_experimental_vp_splice:
24392441
DefaultAttrsIntrinsic<[llvm_anyvector_ty],
@@ -2442,21 +2444,21 @@ def int_experimental_vp_splice:
24422444
llvm_i32_ty,
24432445
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
24442446
llvm_i32_ty, llvm_i32_ty],
2445-
[IntrNoMem, ImmArg<ArgIndex<2>>]>;
2447+
[IntrNoMem, IntrSpeculatable, ImmArg<ArgIndex<2>>]>;
24462448

24472449
def int_experimental_vp_reverse:
24482450
DefaultAttrsIntrinsic<[llvm_anyvector_ty],
24492451
[LLVMMatchType<0>,
24502452
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
24512453
llvm_i32_ty],
2452-
[IntrNoMem]>;
2454+
[IntrNoMem, IntrSpeculatable]>;
24532455

24542456
def int_experimental_vp_splat:
24552457
DefaultAttrsIntrinsic<[llvm_anyvector_ty],
24562458
[LLVMVectorElementType<0>,
24572459
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
24582460
llvm_i32_ty],
2459-
[IntrNoMem]>;
2461+
[IntrNoMem, IntrSpeculatable]>;
24602462

24612463
def int_vp_is_fpclass:
24622464
DefaultAttrsIntrinsic<[ LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
@@ -2753,16 +2755,22 @@ def int_preserve_static_offset : DefaultAttrsIntrinsic<[llvm_ptr_ty],
27532755

27542756
def int_vector_reverse : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
27552757
[LLVMMatchType<0>],
2756-
[IntrNoMem]>;
2758+
[IntrNoMem,
2759+
IntrSpeculatable]>;
27572760

27582761
def int_vector_splice : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
27592762
[LLVMMatchType<0>,
27602763
LLVMMatchType<0>,
27612764
llvm_i32_ty],
2762-
[IntrNoMem, ImmArg<ArgIndex<2>>]>;
2765+
[IntrNoMem,
2766+
IntrSpeculatable,
2767+
ImmArg<ArgIndex<2>>]>;
27632768

27642769
//===---------- Intrinsics to query properties of scalable vectors --------===//
2765-
def int_vscale : DefaultAttrsIntrinsic<[llvm_anyint_ty], [], [IntrNoMem]>;
2770+
def int_vscale : DefaultAttrsIntrinsic<[llvm_anyint_ty],
2771+
[],
2772+
[IntrNoMem,
2773+
IntrSpeculatable]>;
27662774

27672775
//===---------- Intrinsics to perform subvector insertion/extraction ------===//
27682776
def int_vector_insert : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
@@ -2776,18 +2784,22 @@ def int_vector_extract : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
27762784
foreach n = 2...8 in {
27772785
def int_vector_interleave#n : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
27782786
!listsplat(LLVMOneNthElementsVectorType<0, n>, n),
2779-
[IntrNoMem]>;
2787+
[IntrNoMem,
2788+
IntrSpeculatable]>;
27802789

27812790
def int_vector_deinterleave#n : DefaultAttrsIntrinsic<!listsplat(LLVMOneNthElementsVectorType<0, n>, n),
27822791
[llvm_anyvector_ty],
2783-
[IntrNoMem]>;
2792+
[IntrNoMem,
2793+
IntrSpeculatable]>;
27842794
}
27852795

27862796
//===-------------- Intrinsics to perform partial reduction ---------------===//
27872797

27882798
def int_vector_partial_reduce_add : DefaultAttrsIntrinsic<[LLVMMatchType<0>],
2789-
[llvm_anyvector_ty, llvm_anyvector_ty],
2790-
[IntrNoMem]>;
2799+
[llvm_anyvector_ty,
2800+
llvm_anyvector_ty],
2801+
[IntrNoMem,
2802+
IntrSpeculatable]>;
27912803

27922804
//===----------------- Pointer Authentication Intrinsics ------------------===//
27932805
//
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
2+
; RUN: opt -S -passes='loop-mssa(licm)' -verify-memoryssa %s | FileCheck %s
3+
4+
define i32 @reduce_umax(<2 x i32> %inv, i1 %c) {
5+
; CHECK-LABEL: define i32 @reduce_umax(
6+
; CHECK-SAME: <2 x i32> [[INV:%.*]], i1 [[C:%.*]]) {
7+
; CHECK-NEXT: [[ENTRY:.*]]:
8+
; CHECK-NEXT: [[REDUCE_UMAX:%.*]] = call i32 @llvm.vector.reduce.umax.v2i32(<2 x i32> [[INV]])
9+
; CHECK-NEXT: br label %[[LOOP:.*]]
10+
; CHECK: [[LOOP]]:
11+
; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, %[[ENTRY]] ], [ [[IV_NEXT:%.*]], %[[LOOP]] ]
12+
; CHECK-NEXT: [[IV_NEXT]] = add i32 [[IV]], 1
13+
; CHECK-NEXT: [[BACKEDGE_COND:%.*]] = icmp ult i32 [[IV]], [[REDUCE_UMAX]]
14+
; CHECK-NEXT: [[OR_COND:%.*]] = select i1 [[C]], i1 [[BACKEDGE_COND]], i1 false
15+
; CHECK-NEXT: br i1 [[OR_COND]], label %[[LOOP]], label %[[EXIT:.*]]
16+
; CHECK: [[EXIT]]:
17+
; CHECK-NEXT: [[IV_LCSSA:%.*]] = phi i32 [ [[IV]], %[[LOOP]] ]
18+
; CHECK-NEXT: ret i32 [[IV_LCSSA]]
19+
;
20+
entry:
21+
br label %loop
22+
23+
loop:
24+
%iv = phi i32 [ 0, %entry ], [ %iv.next, %cond.true ]
25+
%iv.next = add i32 %iv, 1
26+
br i1 %c, label %cond.true, label %exit
27+
28+
cond.true:
29+
%reduce.umax = call i32 @llvm.vector.reduce.umax.v2i32(<2 x i32> %inv)
30+
%backedge.cond = icmp ult i32 %iv, %reduce.umax
31+
br i1 %backedge.cond, label %loop, label %exit
32+
33+
exit:
34+
ret i32 %iv
35+
}
36+
37+
define i32 @vp_umax(<2 x i32> %inv.l, <2 x i32> %inv.r, i1 %c) {
38+
; CHECK-LABEL: define i32 @vp_umax(
39+
; CHECK-SAME: <2 x i32> [[INV_L:%.*]], <2 x i32> [[INV_R:%.*]], i1 [[C:%.*]]) {
40+
; CHECK-NEXT: [[ENTRY:.*]]:
41+
; CHECK-NEXT: [[VP_UMAX:%.*]] = call <2 x i32> @llvm.vp.umax.v2i32(<2 x i32> [[INV_L]], <2 x i32> [[INV_R]], <2 x i1> splat (i1 true), i32 2)
42+
; CHECK-NEXT: [[EXTRACT:%.*]] = extractelement <2 x i32> [[VP_UMAX]], i32 0
43+
; CHECK-NEXT: br label %[[LOOP:.*]]
44+
; CHECK: [[LOOP]]:
45+
; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, %[[ENTRY]] ], [ [[IV_NEXT:%.*]], %[[LOOP]] ]
46+
; CHECK-NEXT: [[IV_NEXT]] = add i32 [[IV]], 1
47+
; CHECK-NEXT: [[BACKEDGE_COND:%.*]] = icmp ult i32 [[IV]], [[EXTRACT]]
48+
; CHECK-NEXT: [[OR_COND:%.*]] = select i1 [[C]], i1 [[BACKEDGE_COND]], i1 false
49+
; CHECK-NEXT: br i1 [[OR_COND]], label %[[LOOP]], label %[[EXIT:.*]]
50+
; CHECK: [[EXIT]]:
51+
; CHECK-NEXT: [[IV_LCSSA:%.*]] = phi i32 [ [[IV]], %[[LOOP]] ]
52+
; CHECK-NEXT: ret i32 [[IV_LCSSA]]
53+
;
54+
entry:
55+
br label %loop
56+
57+
loop:
58+
%iv = phi i32 [ 0, %entry ], [ %iv.next, %cond.true ]
59+
%iv.next = add i32 %iv, 1
60+
br i1 %c, label %cond.true, label %exit
61+
62+
cond.true:
63+
%vp.umax = call <2 x i32> @llvm.vp.umax.v2i32(<2 x i32> %inv.l, <2 x i32> %inv.r, <2 x i1> splat (i1 1), i32 2)
64+
%extract = extractelement <2 x i32> %vp.umax, i32 0
65+
%backedge.cond = icmp ult i32 %iv, %extract
66+
br i1 %backedge.cond, label %loop, label %exit
67+
68+
exit:
69+
ret i32 %iv
70+
}
71+
72+
define i32 @vp_udiv(<2 x i32> %inv.q, <2 x i32> %inv.d, i1 %c) {
73+
; CHECK-LABEL: define i32 @vp_udiv(
74+
; CHECK-SAME: <2 x i32> [[INV_Q:%.*]], <2 x i32> [[INV_D:%.*]], i1 [[C:%.*]]) {
75+
; CHECK-NEXT: [[ENTRY:.*]]:
76+
; CHECK-NEXT: br label %[[LOOP:.*]]
77+
; CHECK: [[LOOP]]:
78+
; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, %[[ENTRY]] ], [ [[IV_NEXT:%.*]], %[[COND_TRUE:.*]] ]
79+
; CHECK-NEXT: [[IV_NEXT]] = add i32 [[IV]], 1
80+
; CHECK-NEXT: br i1 [[C]], label %[[COND_TRUE]], label %[[EXIT:.*]]
81+
; CHECK: [[COND_TRUE]]:
82+
; CHECK-NEXT: [[VP_UDIV:%.*]] = call <2 x i32> @llvm.vp.udiv.v2i32(<2 x i32> [[INV_Q]], <2 x i32> [[INV_D]], <2 x i1> splat (i1 true), i32 2)
83+
; CHECK-NEXT: [[EXTRACT:%.*]] = extractelement <2 x i32> [[VP_UDIV]], i32 0
84+
; CHECK-NEXT: [[LOOP_COND:%.*]] = icmp ult i32 [[IV]], [[EXTRACT]]
85+
; CHECK-NEXT: br i1 [[LOOP_COND]], label %[[LOOP]], label %[[EXIT]]
86+
; CHECK: [[EXIT]]:
87+
; CHECK-NEXT: [[IV_LCSSA:%.*]] = phi i32 [ [[IV]], %[[COND_TRUE]] ], [ [[IV]], %[[LOOP]] ]
88+
; CHECK-NEXT: ret i32 [[IV_LCSSA]]
89+
;
90+
entry:
91+
br label %loop
92+
93+
loop:
94+
%iv = phi i32 [ 0, %entry ], [ %iv.next, %cond.true ]
95+
%iv.next = add i32 %iv, 1
96+
br i1 %c, label %cond.true, label %exit
97+
98+
cond.true:
99+
%vp.udiv = call <2 x i32> @llvm.vp.udiv.v2i32(<2 x i32> %inv.q, <2 x i32> %inv.d, <2 x i1> splat (i1 1), i32 2)
100+
%extract = extractelement <2 x i32> %vp.udiv, i32 0
101+
%backedge.cond = icmp ult i32 %iv, %extract
102+
br i1 %backedge.cond, label %loop, label %exit
103+
104+
exit:
105+
ret i32 %iv
106+
}
107+
108+
define i32 @vp_load(ptr %inv, i1 %c) {
109+
; CHECK-LABEL: define i32 @vp_load(
110+
; CHECK-SAME: ptr [[INV:%.*]], i1 [[C:%.*]]) {
111+
; CHECK-NEXT: [[ENTRY:.*]]:
112+
; CHECK-NEXT: br label %[[LOOP:.*]]
113+
; CHECK: [[LOOP]]:
114+
; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, %[[ENTRY]] ], [ [[IV_NEXT:%.*]], %[[COND_TRUE:.*]] ]
115+
; CHECK-NEXT: [[IV_NEXT]] = add i32 [[IV]], 1
116+
; CHECK-NEXT: br i1 [[C]], label %[[COND_TRUE]], label %[[EXIT:.*]]
117+
; CHECK: [[COND_TRUE]]:
118+
; CHECK-NEXT: [[VP_LOAD:%.*]] = call <2 x i32> @llvm.vp.load.v2i32.p0(ptr [[INV]], <2 x i1> splat (i1 true), i32 2)
119+
; CHECK-NEXT: [[EXTRACT:%.*]] = extractelement <2 x i32> [[VP_LOAD]], i32 0
120+
; CHECK-NEXT: [[LOOP_COND:%.*]] = icmp ult i32 [[IV]], [[EXTRACT]]
121+
; CHECK-NEXT: br i1 [[LOOP_COND]], label %[[LOOP]], label %[[EXIT]]
122+
; CHECK: [[EXIT]]:
123+
; CHECK-NEXT: [[IV_LCSSA:%.*]] = phi i32 [ [[IV]], %[[COND_TRUE]] ], [ [[IV]], %[[LOOP]] ]
124+
; CHECK-NEXT: ret i32 [[IV_LCSSA]]
125+
;
126+
entry:
127+
br label %loop
128+
129+
loop:
130+
%iv = phi i32 [ 0, %entry ], [ %iv.next, %cond.true ]
131+
%iv.next = add i32 %iv, 1
132+
br i1 %c, label %cond.true, label %exit
133+
134+
cond.true:
135+
%vp.load = call <2 x i32> @llvm.vp.load.v2i32(ptr %inv, <2 x i1> splat (i1 1), i32 2)
136+
%extract = extractelement <2 x i32> %vp.load, i32 0
137+
%backedge.cond = icmp ult i32 %iv, %extract
138+
br i1 %backedge.cond, label %loop, label %exit
139+
140+
exit:
141+
ret i32 %iv
142+
}
143+
144+
define i32 @vp_store(<2 x i32> %inv.v, ptr %inv.p, i1 %c) {
145+
; CHECK-LABEL: define i32 @vp_store(
146+
; CHECK-SAME: <2 x i32> [[INV_V:%.*]], ptr [[INV_P:%.*]], i1 [[C:%.*]]) {
147+
; CHECK-NEXT: [[ENTRY:.*]]:
148+
; CHECK-NEXT: br label %[[LOOP:.*]]
149+
; CHECK: [[LOOP]]:
150+
; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, %[[ENTRY]] ], [ [[IV_NEXT:%.*]], %[[COND_TRUE:.*]] ]
151+
; CHECK-NEXT: [[IV_NEXT]] = add i32 [[IV]], 1
152+
; CHECK-NEXT: br i1 [[C]], label %[[COND_TRUE]], label %[[EXIT:.*]]
153+
; CHECK: [[COND_TRUE]]:
154+
; CHECK-NEXT: call void @llvm.vp.store.v2i32.p0(<2 x i32> [[INV_V]], ptr [[INV_P]], <2 x i1> splat (i1 true), i32 2)
155+
; CHECK-NEXT: [[BACKEDGE_COND:%.*]] = icmp ult i32 [[IV]], 10
156+
; CHECK-NEXT: br i1 [[BACKEDGE_COND]], label %[[LOOP]], label %[[EXIT]]
157+
; CHECK: [[EXIT]]:
158+
; CHECK-NEXT: [[IV_LCSSA:%.*]] = phi i32 [ [[IV]], %[[COND_TRUE]] ], [ [[IV]], %[[LOOP]] ]
159+
; CHECK-NEXT: ret i32 [[IV_LCSSA]]
160+
;
161+
entry:
162+
br label %loop
163+
164+
loop:
165+
%iv = phi i32 [ 0, %entry ], [ %iv.next, %cond.true ]
166+
%iv.next = add i32 %iv, 1
167+
br i1 %c, label %cond.true, label %exit
168+
169+
cond.true:
170+
call void @llvm.vp.store.v2i32(<2 x i32> %inv.v, ptr %inv.p, <2 x i1> splat (i1 1), i32 2)
171+
%backedge.cond = icmp ult i32 %iv, 10
172+
br i1 %backedge.cond, label %loop, label %exit
173+
174+
exit:
175+
ret i32 %iv
176+
}

llvm/test/Transforms/LoopVectorize/RISCV/veclib-function-calls.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2288,7 +2288,7 @@ define void @tgamma_f32(ptr noalias %in.ptr, ptr noalias %out.ptr) {
22882288
}
22892289
;.
22902290
; CHECK: attributes #[[ATTR0]] = { "target-features"="+v" }
2291-
; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(none) }
2291+
; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
22922292
; CHECK: attributes #[[ATTR2]] = { "vector-function-abi-variant"="_ZGVrNxv_acos(Sleef_acosdx_u10rvvm2)" }
22932293
; CHECK: attributes #[[ATTR3]] = { "vector-function-abi-variant"="_ZGVrNxv_acosf(Sleef_acosfx_u10rvvm2)" }
22942294
; CHECK: attributes #[[ATTR4]] = { "vector-function-abi-variant"="_ZGVrNxv_acosh(Sleef_acoshdx_u10rvvm2)" }

llvm/test/Transforms/PreISelIntrinsicLowering/AArch64/expand-exp.ll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,4 @@ declare <4 x float> @llvm.exp.v4f32(<4 x float>) #0
3939
declare <vscale x 4 x float> @llvm.exp.nxv4f32(<vscale x 4 x float>) #0
4040

4141
; CHECK: attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
42-
; CHECK-NEXT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(none) }
4342
attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

0 commit comments

Comments
 (0)