Skip to content

Commit 40a3c93

Browse files
committed
Update standard intrinsics
1 parent ac95b57 commit 40a3c93

File tree

17 files changed

+71
-138
lines changed

17 files changed

+71
-138
lines changed

llvm/include/llvm/IR/Intrinsics.td

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ def int_experimental_memset_pattern
10431043
// FIXME: Add version of these floating point intrinsics which allow non-default
10441044
// rounding modes and FP exception handling.
10451045

1046-
let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
1046+
let IntrProperties = [IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison] in {
10471047
def int_fma : DefaultAttrsIntrinsic<[llvm_anyfloat_ty],
10481048
[LLVMMatchType<0>, LLVMMatchType<0>,
10491049
LLVMMatchType<0>]>;
@@ -1056,16 +1056,8 @@ let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
10561056
// environment so they can be treated as readnone.
10571057
def int_sqrt : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
10581058
def int_powi : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>, llvm_anyint_ty]>;
1059-
def int_asin : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1060-
def int_acos : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1061-
def int_atan : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1062-
def int_atan2 : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>, LLVMMatchType<0>]>;
10631059
def int_sin : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
10641060
def int_cos : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1065-
def int_tan : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1066-
def int_sinh : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1067-
def int_cosh : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1068-
def int_tanh : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
10691061
def int_pow : DefaultAttrsIntrinsic<[llvm_anyfloat_ty],
10701062
[LLVMMatchType<0>, LLVMMatchType<0>]>;
10711063
def int_log : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
@@ -1084,12 +1076,6 @@ let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
10841076
def int_nearbyint : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
10851077
def int_round : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
10861078
def int_roundeven : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1087-
def int_sincos : DefaultAttrsIntrinsic<[LLVMMatchType<0>, LLVMMatchType<0>],
1088-
[llvm_anyfloat_ty]>;
1089-
def int_sincospi : DefaultAttrsIntrinsic<[LLVMMatchType<0>, LLVMMatchType<0>],
1090-
[llvm_anyfloat_ty]>;
1091-
def int_modf : DefaultAttrsIntrinsic<[LLVMMatchType<0>, LLVMMatchType<0>],
1092-
[llvm_anyfloat_ty]>;
10931079

10941080
// Truncate a floating point number with a specific rounding mode
10951081
def int_fptrunc_round : DefaultAttrsIntrinsic<[ llvm_anyfloat_ty ],
@@ -1101,6 +1087,8 @@ let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
11011087
def int_arithmetic_fence : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>],
11021088
[IntrNoMem]>;
11031089

1090+
// If the value doesn't fit an unspecified value is returned (but this
1091+
// is not poison).
11041092
def int_lround : DefaultAttrsIntrinsic<[llvm_anyint_ty], [llvm_anyfloat_ty]>;
11051093
def int_llround : DefaultAttrsIntrinsic<[llvm_anyint_ty], [llvm_anyfloat_ty]>;
11061094
def int_lrint : DefaultAttrsIntrinsic<[llvm_anyint_ty], [llvm_anyfloat_ty]>;
@@ -1114,29 +1102,49 @@ let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
11141102
def int_frexp : DefaultAttrsIntrinsic<[llvm_anyfloat_ty, llvm_anyint_ty], [LLVMMatchType<0>]>;
11151103
}
11161104

1105+
let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
1106+
// These functions do not read memory, but are sensitive to the
1107+
// rounding mode. LLVM purposely does not model changes to the FP
1108+
// environment so they can be treated as readnone.
1109+
def int_asin : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1110+
def int_acos : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1111+
def int_atan : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1112+
def int_atan2 : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>, LLVMMatchType<0>]>;
1113+
def int_tan : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1114+
def int_sinh : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1115+
def int_cosh : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1116+
def int_tanh : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>;
1117+
def int_sincos : DefaultAttrsIntrinsic<[LLVMMatchType<0>, LLVMMatchType<0>],
1118+
[llvm_anyfloat_ty]>;
1119+
def int_sincospi : DefaultAttrsIntrinsic<[LLVMMatchType<0>, LLVMMatchType<0>],
1120+
[llvm_anyfloat_ty]>;
1121+
def int_modf : DefaultAttrsIntrinsic<[LLVMMatchType<0>, LLVMMatchType<0>],
1122+
[llvm_anyfloat_ty]>;
1123+
}
1124+
11171125
def int_minnum : DefaultAttrsIntrinsic<[llvm_anyfloat_ty],
11181126
[LLVMMatchType<0>, LLVMMatchType<0>],
1119-
[IntrNoMem, IntrSpeculatable, Commutative]
1127+
[IntrNoMem, IntrSpeculatable, Commutative, IntrNoCreateUndefOrPoison]
11201128
>;
11211129
def int_maxnum : DefaultAttrsIntrinsic<[llvm_anyfloat_ty],
11221130
[LLVMMatchType<0>, LLVMMatchType<0>],
1123-
[IntrNoMem, IntrSpeculatable, Commutative]
1131+
[IntrNoMem, IntrSpeculatable, Commutative, IntrNoCreateUndefOrPoison]
11241132
>;
11251133
def int_minimum : DefaultAttrsIntrinsic<[llvm_anyfloat_ty],
11261134
[LLVMMatchType<0>, LLVMMatchType<0>],
1127-
[IntrNoMem, IntrSpeculatable, Commutative]
1135+
[IntrNoMem, IntrSpeculatable, Commutative, IntrNoCreateUndefOrPoison]
11281136
>;
11291137
def int_maximum : DefaultAttrsIntrinsic<[llvm_anyfloat_ty],
11301138
[LLVMMatchType<0>, LLVMMatchType<0>],
1131-
[IntrNoMem, IntrSpeculatable, Commutative]
1139+
[IntrNoMem, IntrSpeculatable, Commutative, IntrNoCreateUndefOrPoison]
11321140
>;
11331141
def int_minimumnum : DefaultAttrsIntrinsic<[llvm_anyfloat_ty],
11341142
[LLVMMatchType<0>, LLVMMatchType<0>],
1135-
[IntrNoMem, IntrSpeculatable, Commutative]
1143+
[IntrNoMem, IntrSpeculatable, Commutative, IntrNoCreateUndefOrPoison]
11361144
>;
11371145
def int_maximumnum : DefaultAttrsIntrinsic<[llvm_anyfloat_ty],
11381146
[LLVMMatchType<0>, LLVMMatchType<0>],
1139-
[IntrNoMem, IntrSpeculatable, Commutative]
1147+
[IntrNoMem, IntrSpeculatable, Commutative, IntrNoCreateUndefOrPoison]
11401148
>;
11411149

11421150
// Internal interface for object size checking
@@ -1168,7 +1176,7 @@ let IntrProperties = [IntrInaccessibleMemOnly] in {
11681176
def int_is_fpclass
11691177
: DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
11701178
[llvm_anyfloat_ty, llvm_i32_ty],
1171-
[IntrNoMem, IntrSpeculatable, ImmArg<ArgIndex<1>>]>;
1179+
[IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison, ImmArg<ArgIndex<1>>]>;
11721180

11731181
//===--------------- Constrained Floating Point Intrinsics ----------------===//
11741182
//
@@ -1410,7 +1418,7 @@ def int_expect_with_probability : DefaultAttrsIntrinsic<[llvm_anyint_ty],
14101418
//
14111419

14121420
// None of these intrinsics accesses memory at all.
1413-
let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
1421+
let IntrProperties = [IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison] in {
14141422
def int_bswap: DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>]>;
14151423
def int_ctpop: DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>]>;
14161424
def int_bitreverse : DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>]>;
@@ -1526,7 +1534,7 @@ def int_adjust_trampoline : DefaultAttrsIntrinsic<
15261534
//
15271535

15281536
// Expose the carry flag from add operations on two integrals.
1529-
let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
1537+
let IntrProperties = [IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison] in {
15301538
def int_sadd_with_overflow : DefaultAttrsIntrinsic<[llvm_anyint_ty,
15311539
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
15321540
[LLVMMatchType<0>, LLVMMatchType<0>]>;
@@ -1552,16 +1560,16 @@ let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
15521560
//
15531561
def int_sadd_sat : DefaultAttrsIntrinsic<[llvm_anyint_ty],
15541562
[LLVMMatchType<0>, LLVMMatchType<0>],
1555-
[IntrNoMem, IntrSpeculatable, Commutative]>;
1563+
[IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison, Commutative]>;
15561564
def int_uadd_sat : DefaultAttrsIntrinsic<[llvm_anyint_ty],
15571565
[LLVMMatchType<0>, LLVMMatchType<0>],
1558-
[IntrNoMem, IntrSpeculatable, Commutative]>;
1566+
[IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison, Commutative]>;
15591567
def int_ssub_sat : DefaultAttrsIntrinsic<[llvm_anyint_ty],
15601568
[LLVMMatchType<0>, LLVMMatchType<0>],
1561-
[IntrNoMem, IntrSpeculatable]>;
1569+
[IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison]>;
15621570
def int_usub_sat : DefaultAttrsIntrinsic<[llvm_anyint_ty],
15631571
[LLVMMatchType<0>, LLVMMatchType<0>],
1564-
[IntrNoMem, IntrSpeculatable]>;
1572+
[IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison]>;
15651573
def int_sshl_sat : DefaultAttrsIntrinsic<[llvm_anyint_ty],
15661574
[LLVMMatchType<0>, LLVMMatchType<0>],
15671575
[IntrNoMem, IntrSpeculatable]>;
@@ -1616,22 +1624,22 @@ def int_abs : DefaultAttrsIntrinsic<
16161624

16171625
def int_smax : DefaultAttrsIntrinsic<
16181626
[llvm_anyint_ty], [LLVMMatchType<0>, LLVMMatchType<0>],
1619-
[IntrNoMem, IntrSpeculatable]>;
1627+
[IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison]>;
16201628
def int_smin : DefaultAttrsIntrinsic<
16211629
[llvm_anyint_ty], [LLVMMatchType<0>, LLVMMatchType<0>],
1622-
[IntrNoMem, IntrSpeculatable]>;
1630+
[IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison]>;
16231631
def int_umax : DefaultAttrsIntrinsic<
16241632
[llvm_anyint_ty], [LLVMMatchType<0>, LLVMMatchType<0>],
1625-
[IntrNoMem, IntrSpeculatable]>;
1633+
[IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison]>;
16261634
def int_umin : DefaultAttrsIntrinsic<
16271635
[llvm_anyint_ty], [LLVMMatchType<0>, LLVMMatchType<0>],
1628-
[IntrNoMem, IntrSpeculatable]>;
1636+
[IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison]>;
16291637
def int_scmp : DefaultAttrsIntrinsic<
16301638
[llvm_anyint_ty], [llvm_anyint_ty, LLVMMatchType<1>],
1631-
[IntrNoMem, IntrSpeculatable, Range<RetIndex, -1, 2>]>;
1639+
[IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison, Range<RetIndex, -1, 2>]>;
16321640
def int_ucmp : DefaultAttrsIntrinsic<
16331641
[llvm_anyint_ty], [llvm_anyint_ty, LLVMMatchType<1>],
1634-
[IntrNoMem, IntrSpeculatable, Range<RetIndex, -1, 2>]>;
1642+
[IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison, Range<RetIndex, -1, 2>]>;
16351643

16361644
//===------------------------- Memory Use Markers -------------------------===//
16371645
//
@@ -1873,7 +1881,7 @@ def int_convert_from_fp16 : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [llvm_i16_
18731881
}
18741882

18751883
// Saturating floating point to integer intrinsics
1876-
let IntrProperties = [IntrNoMem, IntrSpeculatable] in {
1884+
let IntrProperties = [IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison] in {
18771885
def int_fptoui_sat : DefaultAttrsIntrinsic<[llvm_anyint_ty], [llvm_anyfloat_ty]>;
18781886
def int_fptosi_sat : DefaultAttrsIntrinsic<[llvm_anyint_ty], [llvm_anyfloat_ty]>;
18791887
}
@@ -1896,7 +1904,7 @@ def int_fake_use : DefaultAttrsIntrinsic<[], [llvm_vararg_ty],
18961904
// First argument must be pointer or vector of pointer. This is checked by the
18971905
// verifier.
18981906
def int_ptrmask: DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>, llvm_anyint_ty],
1899-
[IntrNoMem, IntrSpeculatable]>;
1907+
[IntrNoMem, IntrSpeculatable, IntrNoCreateUndefOrPoison]>;
19001908

19011909
// Intrinsic to wrap a thread local variable.
19021910
def int_threadlocal_address : DefaultAttrsIntrinsic<[llvm_anyptr_ty], [LLVMMatchType<0>],

llvm/include/llvm/IR/IntrinsicsAMDGPU.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ def int_amdgcn_log_clamp : DefaultAttrsIntrinsic<
449449

450450
def int_amdgcn_fmul_legacy : ClangBuiltin<"__builtin_amdgcn_fmul_legacy">,
451451
DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
452-
[IntrNoMem, IntrSpeculatable, Commutative, IntrNoCreateUndefOrPoison]
452+
[IntrNoMem, IntrSpeculatable, Commutative]
453453
>;
454454

455455
// Fused single-precision multiply-add with legacy behaviour for the multiply,

llvm/lib/Analysis/ValueTracking.cpp

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -7419,79 +7419,12 @@ static bool canCreateUndefOrPoison(const Operator *Op, UndefPoisonKind Kind,
74197419
if (cast<ConstantInt>(II->getArgOperand(1))->isNullValue())
74207420
return false;
74217421
break;
7422-
case Intrinsic::ctpop:
7423-
case Intrinsic::bswap:
7424-
case Intrinsic::bitreverse:
7425-
case Intrinsic::fshl:
7426-
case Intrinsic::fshr:
7427-
case Intrinsic::smax:
7428-
case Intrinsic::smin:
7429-
case Intrinsic::scmp:
7430-
case Intrinsic::umax:
7431-
case Intrinsic::umin:
7432-
case Intrinsic::ucmp:
7433-
case Intrinsic::ptrmask:
7434-
case Intrinsic::fptoui_sat:
7435-
case Intrinsic::fptosi_sat:
7436-
case Intrinsic::sadd_with_overflow:
7437-
case Intrinsic::ssub_with_overflow:
7438-
case Intrinsic::smul_with_overflow:
7439-
case Intrinsic::uadd_with_overflow:
7440-
case Intrinsic::usub_with_overflow:
7441-
case Intrinsic::umul_with_overflow:
7442-
case Intrinsic::sadd_sat:
7443-
case Intrinsic::uadd_sat:
7444-
case Intrinsic::ssub_sat:
7445-
case Intrinsic::usub_sat:
7446-
return false;
74477422
case Intrinsic::sshl_sat:
74487423
case Intrinsic::ushl_sat:
74497424
if (!includesPoison(Kind) ||
74507425
shiftAmountKnownInRange(II->getArgOperand(1)))
74517426
return false;
74527427
break;
7453-
case Intrinsic::fma:
7454-
case Intrinsic::fmuladd:
7455-
case Intrinsic::sqrt:
7456-
case Intrinsic::powi:
7457-
case Intrinsic::sin:
7458-
case Intrinsic::cos:
7459-
case Intrinsic::pow:
7460-
case Intrinsic::log:
7461-
case Intrinsic::log10:
7462-
case Intrinsic::log2:
7463-
case Intrinsic::exp:
7464-
case Intrinsic::exp2:
7465-
case Intrinsic::exp10:
7466-
case Intrinsic::fabs:
7467-
case Intrinsic::copysign:
7468-
case Intrinsic::floor:
7469-
case Intrinsic::ceil:
7470-
case Intrinsic::trunc:
7471-
case Intrinsic::rint:
7472-
case Intrinsic::nearbyint:
7473-
case Intrinsic::round:
7474-
case Intrinsic::roundeven:
7475-
case Intrinsic::fptrunc_round:
7476-
case Intrinsic::canonicalize:
7477-
case Intrinsic::arithmetic_fence:
7478-
case Intrinsic::minnum:
7479-
case Intrinsic::maxnum:
7480-
case Intrinsic::minimum:
7481-
case Intrinsic::maximum:
7482-
case Intrinsic::minimumnum:
7483-
case Intrinsic::maximumnum:
7484-
case Intrinsic::is_fpclass:
7485-
case Intrinsic::ldexp:
7486-
case Intrinsic::frexp:
7487-
return false;
7488-
case Intrinsic::lround:
7489-
case Intrinsic::llround:
7490-
case Intrinsic::lrint:
7491-
case Intrinsic::llrint:
7492-
// If the value doesn't fit an unspecified value is returned (but this
7493-
// is not poison).
7494-
return false;
74957428
}
74967429
}
74977430
[[fallthrough]];

llvm/test/CodeGen/AArch64/replace-with-veclib-armpl.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,7 @@ define <vscale x 4 x float> @llvm_tanh_vscale_f32(<vscale x 4 x float> %in) #0 {
780780

781781
attributes #0 = { "target-features"="+sve" }
782782
;.
783-
; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
783+
; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
784784
; CHECK: attributes #[[ATTR1]] = { "target-features"="+sve" }
785+
; CHECK: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
785786
;.

llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-rootn.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,7 @@ attributes #2 = { noinline }
14891489
!0 = !{float 3.0}
14901490
;.
14911491
; CHECK: attributes #[[ATTR0]] = { strictfp }
1492-
; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
1492+
; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
14931493
; CHECK: attributes #[[ATTR2:[0-9]+]] = { nounwind memory(read) }
14941494
; CHECK: attributes #[[ATTR3]] = { noinline }
14951495
; CHECK: attributes #[[ATTR4]] = { nobuiltin }

llvm/test/CodeGen/RISCV/replace-with-veclib-sleef-scalable.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,5 +488,5 @@ declare <vscale x 2 x double> @llvm.trunc.nxv2f64(<vscale x 2 x double>)
488488
declare <vscale x 4 x float> @llvm.trunc.nxv4f32(<vscale x 4 x float>)
489489
;.
490490
; CHECK: attributes #[[ATTR0]] = { "target-features"="+v" }
491-
; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) "target-features"="+v" }
491+
; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) "target-features"="+v" }
492492
;.

llvm/test/Feature/intrinsics.ll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,12 @@ define void @libm() {
6464

6565
; FIXME: test ALL the intrinsics in this file.
6666

67-
; CHECK: declare void @llvm.trap() #1
67+
; CHECK: declare void @llvm.trap() #2
6868
declare void @llvm.trap()
6969

7070
define void @trap() {
7171
call void @llvm.trap()
7272
ret void
7373
}
7474

75-
; CHECK: attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
76-
; CHECK: attributes #1 = { cold noreturn nounwind memory(inaccessiblemem: write) }
75+
; CHECK: attributes #2 = { cold noreturn nounwind memory(inaccessiblemem: write) }

llvm/test/Linker/drop-attribute.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ define void @test_nocallback_definition() nocallback {
3939
declare void @test_nocallback_call_site()
4040

4141
; Test that checks that nocallback attribute on an intrinsic is NOT dropped.
42-
; CHECK: ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn
42+
; CHECK: ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn
4343
; CHECK-NEXT: declare float @llvm.sqrt.f32(float) #0
4444
declare float @llvm.sqrt.f32(float) nocallback
4545

llvm/test/Transforms/Attributor/nofree.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ define void @call_both() #0 {
238238

239239
; TEST 10 (positive case)
240240
; Call intrinsic function
241-
; CHECK: Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
241+
; CHECK: Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
242242
declare float @llvm.floor.f32(float)
243243

244244
define void @call_floor(float %a) #0 {
@@ -489,7 +489,7 @@ attributes #2 = { nobuiltin nounwind }
489489
; TUNIT: attributes #[[ATTR3]] = { mustprogress nofree noinline norecurse nosync nounwind willreturn memory(none) uwtable }
490490
; TUNIT: attributes #[[ATTR4]] = { mustprogress nofree noinline nosync nounwind willreturn memory(none) uwtable }
491491
; TUNIT: attributes #[[ATTR5:[0-9]+]] = { nofree noinline nounwind memory(none) uwtable }
492-
; TUNIT: attributes #[[ATTR6:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
492+
; TUNIT: attributes #[[ATTR6:[0-9]+]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
493493
; TUNIT: attributes #[[ATTR7]] = { nofree nounwind }
494494
; TUNIT: attributes #[[ATTR8]] = { nobuiltin nofree nounwind }
495495
; TUNIT: attributes #[[ATTR9]] = { nosync memory(none) }
@@ -506,7 +506,7 @@ attributes #2 = { nobuiltin nounwind }
506506
; CGSCC: attributes #[[ATTR3]] = { mustprogress nofree noinline norecurse nosync nounwind willreturn memory(none) uwtable }
507507
; CGSCC: attributes #[[ATTR4:[0-9]+]] = { nofree noinline nounwind memory(none) uwtable }
508508
; CGSCC: attributes #[[ATTR5]] = { mustprogress nofree noinline nosync nounwind willreturn memory(none) uwtable }
509-
; CGSCC: attributes #[[ATTR6:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
509+
; CGSCC: attributes #[[ATTR6:[0-9]+]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
510510
; CGSCC: attributes #[[ATTR7]] = { nofree nounwind }
511511
; CGSCC: attributes #[[ATTR8]] = { nobuiltin nofree nounwind }
512512
; CGSCC: attributes #[[ATTR9]] = { nosync memory(none) }

llvm/test/Transforms/Attributor/nosync.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ define void @nosync_convergent_callee_test() {
454454
; CHECK: attributes #[[ATTR14:[0-9]+]] = { convergent memory(none) }
455455
; CHECK: attributes #[[ATTR15]] = { memory(none) }
456456
; CHECK: attributes #[[ATTR16]] = { nounwind }
457-
; CHECK: attributes #[[ATTR17:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
457+
; CHECK: attributes #[[ATTR17:[0-9]+]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
458458
; CHECK: attributes #[[ATTR18]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
459459
; CHECK: attributes #[[ATTR19]] = { nosync memory(none) }
460460
; CHECK: attributes #[[ATTR20]] = { nofree nounwind }

0 commit comments

Comments
 (0)