Skip to content

Commit d48d108

Browse files
jdoerfertarsenm
andauthored
[Attributor][FIX] Replace AANoFPClass MBEC propagation (#91030)
The old use of must-be-executed-context (MBEC) did propagate through calls even if that was not allowed. We now only propagate from call site arguments. If there are calls/intrinsics that allows propagation, we need to add them explicitly. Fixes: #78507 --------- Co-authored-by: Matt Arsenault <[email protected]>
1 parent e9dd6b2 commit d48d108

34 files changed

+1644
-1654
lines changed

llvm/include/llvm/Transforms/IPO/Attributor.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -5418,10 +5418,14 @@ struct AANoFPClass
54185418
return false;
54195419
}
54205420

5421-
/// Return true if we assume that the underlying value is nofpclass.
5421+
/// Return the underlying assumed nofpclass.
54225422
FPClassTest getAssumedNoFPClass() const {
54235423
return static_cast<FPClassTest>(getAssumed());
54245424
}
5425+
/// Return the underlying known nofpclass.
5426+
FPClassTest getKnownNoFPClass() const {
5427+
return static_cast<FPClassTest>(getKnown());
5428+
}
54255429

54265430
/// Create an abstract attribute view for the position \p IRP.
54275431
static AANoFPClass &createForPosition(const IRPosition &IRP, Attributor &A);

llvm/lib/Transforms/IPO/AttributorAttributes.cpp

+12-35
Original file line numberDiff line numberDiff line change
@@ -10338,48 +10338,25 @@ struct AANoFPClassImpl : AANoFPClass {
1033810338
/// See followUsesInMBEC
1033910339
bool followUseInMBEC(Attributor &A, const Use *U, const Instruction *I,
1034010340
AANoFPClass::StateType &State) {
10341-
const Value *UseV = U->get();
10342-
const DominatorTree *DT = nullptr;
10343-
AssumptionCache *AC = nullptr;
10344-
const TargetLibraryInfo *TLI = nullptr;
10345-
InformationCache &InfoCache = A.getInfoCache();
10346-
10347-
if (Function *F = getAnchorScope()) {
10348-
DT = InfoCache.getAnalysisResultForFunction<DominatorTreeAnalysis>(*F);
10349-
AC = InfoCache.getAnalysisResultForFunction<AssumptionAnalysis>(*F);
10350-
TLI = InfoCache.getTargetLibraryInfoForFunction(*F);
10351-
}
10352-
10353-
const DataLayout &DL = A.getDataLayout();
10354-
10355-
KnownFPClass KnownFPClass =
10356-
computeKnownFPClass(UseV, DL,
10357-
/*InterestedClasses=*/fcAllFlags,
10358-
/*Depth=*/0, TLI, AC, I, DT);
10359-
State.addKnownBits(~KnownFPClass.KnownFPClasses);
10360-
10361-
if (auto *CI = dyn_cast<CallInst>(UseV)) {
10362-
// Special case FP intrinsic with struct return type.
10363-
switch (CI->getIntrinsicID()) {
10364-
case Intrinsic::frexp:
10365-
return true;
10366-
case Intrinsic::not_intrinsic:
10367-
// TODO: Could recognize math libcalls
10368-
return false;
10369-
default:
10370-
break;
10371-
}
10372-
}
10341+
// TODO: Determine what instructions can be looked through.
10342+
auto *CB = dyn_cast<CallBase>(I);
10343+
if (!CB)
10344+
return false;
1037310345

10374-
if (!UseV->getType()->isFPOrFPVectorTy())
10346+
if (!CB->isArgOperand(U))
1037510347
return false;
10376-
return !isa<LoadInst, AtomicRMWInst>(UseV);
10348+
10349+
unsigned ArgNo = CB->getArgOperandNo(U);
10350+
IRPosition IRP = IRPosition::callsite_argument(*CB, ArgNo);
10351+
if (auto *NoFPAA = A.getAAFor<AANoFPClass>(*this, IRP, DepClassTy::NONE))
10352+
State.addKnownBits(NoFPAA->getState().getKnown());
10353+
return false;
1037710354
}
1037810355

1037910356
const std::string getAsStr(Attributor *A) const override {
1038010357
std::string Result = "nofpclass";
1038110358
raw_string_ostream OS(Result);
10382-
OS << getAssumedNoFPClass();
10359+
OS << getKnownNoFPClass() << '/' << getAssumedNoFPClass();
1038310360
return Result;
1038410361
}
1038510362

llvm/test/Transforms/Attributor/nofpclass-arithmetic-fence.ll

+10-10
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ define float @ret_arithmetic.fence(float %arg0) {
1616
define float @ret_arithmetic.fence_noinf(float nofpclass(inf) %arg0) {
1717
; CHECK-LABEL: define nofpclass(inf) float @ret_arithmetic.fence_noinf
1818
; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] {
19-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.arithmetic.fence.f32(float [[ARG0]]) #[[ATTR2]]
19+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf) float @llvm.arithmetic.fence.f32(float nofpclass(inf) [[ARG0]]) #[[ATTR2]]
2020
; CHECK-NEXT: ret float [[CALL]]
2121
;
2222
%call = call float @llvm.arithmetic.fence.f32(float %arg0)
@@ -26,7 +26,7 @@ define float @ret_arithmetic.fence_noinf(float nofpclass(inf) %arg0) {
2626
define float @ret_arithmetic.fence_nopinf(float nofpclass(pinf) %arg0) {
2727
; CHECK-LABEL: define nofpclass(pinf) float @ret_arithmetic.fence_nopinf
2828
; CHECK-SAME: (float nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] {
29-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf) float @llvm.arithmetic.fence.f32(float [[ARG0]]) #[[ATTR2]]
29+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf) float @llvm.arithmetic.fence.f32(float nofpclass(pinf) [[ARG0]]) #[[ATTR2]]
3030
; CHECK-NEXT: ret float [[CALL]]
3131
;
3232
%call = call float @llvm.arithmetic.fence.f32(float %arg0)
@@ -36,7 +36,7 @@ define float @ret_arithmetic.fence_nopinf(float nofpclass(pinf) %arg0) {
3636
define float @ret_arithmetic.fence_noninf(float nofpclass(ninf) %arg0) {
3737
; CHECK-LABEL: define nofpclass(ninf) float @ret_arithmetic.fence_noninf
3838
; CHECK-SAME: (float nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] {
39-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf) float @llvm.arithmetic.fence.f32(float [[ARG0]]) #[[ATTR2]]
39+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf) float @llvm.arithmetic.fence.f32(float nofpclass(ninf) [[ARG0]]) #[[ATTR2]]
4040
; CHECK-NEXT: ret float [[CALL]]
4141
;
4242
%call = call float @llvm.arithmetic.fence.f32(float %arg0)
@@ -46,7 +46,7 @@ define float @ret_arithmetic.fence_noninf(float nofpclass(ninf) %arg0) {
4646
define float @ret_arithmetic.fence_nonan(float nofpclass(nan) %arg0) {
4747
; CHECK-LABEL: define nofpclass(nan) float @ret_arithmetic.fence_nonan
4848
; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] {
49-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan) float @llvm.arithmetic.fence.f32(float [[ARG0]]) #[[ATTR2]]
49+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan) float @llvm.arithmetic.fence.f32(float nofpclass(nan) [[ARG0]]) #[[ATTR2]]
5050
; CHECK-NEXT: ret float [[CALL]]
5151
;
5252
%call = call float @llvm.arithmetic.fence.f32(float %arg0)
@@ -56,7 +56,7 @@ define float @ret_arithmetic.fence_nonan(float nofpclass(nan) %arg0) {
5656
define float @ret_arithmetic.fence_noqnan(float nofpclass(qnan) %arg0) {
5757
; CHECK-LABEL: define nofpclass(qnan) float @ret_arithmetic.fence_noqnan
5858
; CHECK-SAME: (float nofpclass(qnan) [[ARG0:%.*]]) #[[ATTR1]] {
59-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(qnan) float @llvm.arithmetic.fence.f32(float [[ARG0]]) #[[ATTR2]]
59+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(qnan) float @llvm.arithmetic.fence.f32(float nofpclass(qnan) [[ARG0]]) #[[ATTR2]]
6060
; CHECK-NEXT: ret float [[CALL]]
6161
;
6262
%call = call float @llvm.arithmetic.fence.f32(float %arg0)
@@ -66,7 +66,7 @@ define float @ret_arithmetic.fence_noqnan(float nofpclass(qnan) %arg0) {
6666
define float @ret_arithmetic.fence_nosnan(float nofpclass(snan) %arg0) {
6767
; CHECK-LABEL: define nofpclass(snan) float @ret_arithmetic.fence_nosnan
6868
; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] {
69-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan) float @llvm.arithmetic.fence.f32(float [[ARG0]]) #[[ATTR2]]
69+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan) float @llvm.arithmetic.fence.f32(float nofpclass(snan) [[ARG0]]) #[[ATTR2]]
7070
; CHECK-NEXT: ret float [[CALL]]
7171
;
7272
%call = call float @llvm.arithmetic.fence.f32(float %arg0)
@@ -76,7 +76,7 @@ define float @ret_arithmetic.fence_nosnan(float nofpclass(snan) %arg0) {
7676
define float @ret_arithmetic.fence_nozero(float nofpclass(zero) %arg0) {
7777
; CHECK-LABEL: define nofpclass(zero) float @ret_arithmetic.fence_nozero
7878
; CHECK-SAME: (float nofpclass(zero) [[ARG0:%.*]]) #[[ATTR1]] {
79-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(zero) float @llvm.arithmetic.fence.f32(float [[ARG0]]) #[[ATTR2]]
79+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(zero) float @llvm.arithmetic.fence.f32(float nofpclass(zero) [[ARG0]]) #[[ATTR2]]
8080
; CHECK-NEXT: ret float [[CALL]]
8181
;
8282
%call = call float @llvm.arithmetic.fence.f32(float %arg0)
@@ -86,7 +86,7 @@ define float @ret_arithmetic.fence_nozero(float nofpclass(zero) %arg0) {
8686
define float @ret_arithmetic.fence_nopzero(float nofpclass(pzero) %arg0) {
8787
; CHECK-LABEL: define nofpclass(pzero) float @ret_arithmetic.fence_nopzero
8888
; CHECK-SAME: (float nofpclass(pzero) [[ARG0:%.*]]) #[[ATTR1]] {
89-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pzero) float @llvm.arithmetic.fence.f32(float [[ARG0]]) #[[ATTR2]]
89+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pzero) float @llvm.arithmetic.fence.f32(float nofpclass(pzero) [[ARG0]]) #[[ATTR2]]
9090
; CHECK-NEXT: ret float [[CALL]]
9191
;
9292
%call = call float @llvm.arithmetic.fence.f32(float %arg0)
@@ -96,7 +96,7 @@ define float @ret_arithmetic.fence_nopzero(float nofpclass(pzero) %arg0) {
9696
define float @ret_arithmetic.fence_nonzero(float nofpclass(nzero) %arg0) {
9797
; CHECK-LABEL: define nofpclass(nzero) float @ret_arithmetic.fence_nonzero
9898
; CHECK-SAME: (float nofpclass(nzero) [[ARG0:%.*]]) #[[ATTR1]] {
99-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nzero) float @llvm.arithmetic.fence.f32(float [[ARG0]]) #[[ATTR2]]
99+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nzero) float @llvm.arithmetic.fence.f32(float nofpclass(nzero) [[ARG0]]) #[[ATTR2]]
100100
; CHECK-NEXT: ret float [[CALL]]
101101
;
102102
%call = call float @llvm.arithmetic.fence.f32(float %arg0)
@@ -106,7 +106,7 @@ define float @ret_arithmetic.fence_nonzero(float nofpclass(nzero) %arg0) {
106106
define float @ret_arithmetic.fence_nonorm(float nofpclass(norm) %arg0) {
107107
; CHECK-LABEL: define nofpclass(norm) float @ret_arithmetic.fence_nonorm
108108
; CHECK-SAME: (float nofpclass(norm) [[ARG0:%.*]]) #[[ATTR1]] {
109-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(norm) float @llvm.arithmetic.fence.f32(float [[ARG0]]) #[[ATTR2]]
109+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(norm) float @llvm.arithmetic.fence.f32(float nofpclass(norm) [[ARG0]]) #[[ATTR2]]
110110
; CHECK-NEXT: ret float [[CALL]]
111111
;
112112
%call = call float @llvm.arithmetic.fence.f32(float %arg0)

llvm/test/Transforms/Attributor/nofpclass-canonicalize.ll

+19-19
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ declare float @llvm.canonicalize.f32(float)
55

66
define float @ret_canonicalize(float %arg0) {
77
; CHECK-LABEL: define nofpclass(snan) float @ret_canonicalize
8-
; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1:[0-9]+]] {
8+
; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1:[0-9]+]] {
99
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan) float @llvm.canonicalize.f32(float [[ARG0]]) #[[ATTR12:[0-9]+]]
1010
; CHECK-NEXT: ret float [[CALL]]
1111
;
@@ -15,8 +15,8 @@ define float @ret_canonicalize(float %arg0) {
1515

1616
define float @ret_canonicalize_noinf(float nofpclass(inf) %arg0) {
1717
; CHECK-LABEL: define nofpclass(snan inf) float @ret_canonicalize_noinf
18-
; CHECK-SAME: (float nofpclass(snan inf) [[ARG0:%.*]]) #[[ATTR1]] {
19-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf) float @llvm.canonicalize.f32(float [[ARG0]]) #[[ATTR12]]
18+
; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] {
19+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf) float @llvm.canonicalize.f32(float nofpclass(inf) [[ARG0]]) #[[ATTR12]]
2020
; CHECK-NEXT: ret float [[CALL]]
2121
;
2222
%call = call float @llvm.canonicalize.f32(float %arg0)
@@ -25,8 +25,8 @@ define float @ret_canonicalize_noinf(float nofpclass(inf) %arg0) {
2525

2626
define float @ret_canonicalize_dynamic_denormal(float nofpclass(inf) %arg0) "denormal-fp-math"="dynamic,dynamic" {
2727
; CHECK-LABEL: define nofpclass(snan inf) float @ret_canonicalize_dynamic_denormal
28-
; CHECK-SAME: (float nofpclass(snan inf) [[ARG0:%.*]]) #[[ATTR2:[0-9]+]] {
29-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf) float @llvm.canonicalize.f32(float [[ARG0]]) #[[ATTR12]]
28+
; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR2:[0-9]+]] {
29+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf) float @llvm.canonicalize.f32(float nofpclass(inf) [[ARG0]]) #[[ATTR12]]
3030
; CHECK-NEXT: ret float [[CALL]]
3131
;
3232
%call = call float @llvm.canonicalize.f32(float %arg0)
@@ -35,8 +35,8 @@ define float @ret_canonicalize_dynamic_denormal(float nofpclass(inf) %arg0) "den
3535

3636
define float @ret_canonicalize_daz_denormal(float nofpclass(inf) %arg0) "denormal-fp-math"="dynamic,preserve-sign" {
3737
; CHECK-LABEL: define nofpclass(snan inf sub) float @ret_canonicalize_daz_denormal
38-
; CHECK-SAME: (float nofpclass(snan inf sub) [[ARG0:%.*]]) #[[ATTR3:[0-9]+]] {
39-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf sub) float @llvm.canonicalize.f32(float [[ARG0]]) #[[ATTR12]]
38+
; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR3:[0-9]+]] {
39+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf sub) float @llvm.canonicalize.f32(float nofpclass(inf) [[ARG0]]) #[[ATTR12]]
4040
; CHECK-NEXT: ret float [[CALL]]
4141
;
4242
%call = call float @llvm.canonicalize.f32(float %arg0)
@@ -45,8 +45,8 @@ define float @ret_canonicalize_daz_denormal(float nofpclass(inf) %arg0) "denorma
4545

4646
define float @ret_canonicalize_dapz_denormal(float nofpclass(inf) %arg0) "denormal-fp-math"="dynamic,positive-zero" {
4747
; CHECK-LABEL: define nofpclass(snan inf nzero sub) float @ret_canonicalize_dapz_denormal
48-
; CHECK-SAME: (float nofpclass(snan inf nzero sub) [[ARG0:%.*]]) #[[ATTR4:[0-9]+]] {
49-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf nzero sub) float @llvm.canonicalize.f32(float [[ARG0]]) #[[ATTR12]]
48+
; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR4:[0-9]+]] {
49+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf nzero sub) float @llvm.canonicalize.f32(float nofpclass(inf) [[ARG0]]) #[[ATTR12]]
5050
; CHECK-NEXT: ret float [[CALL]]
5151
;
5252
%call = call float @llvm.canonicalize.f32(float %arg0)
@@ -55,8 +55,8 @@ define float @ret_canonicalize_dapz_denormal(float nofpclass(inf) %arg0) "denorm
5555

5656
define float @ret_canonicalize_ftpz_dapz_denormal(float nofpclass(inf) %arg0) "denormal-fp-math"="positive-zero,preserve-sign" {
5757
; CHECK-LABEL: define nofpclass(snan inf sub) float @ret_canonicalize_ftpz_dapz_denormal
58-
; CHECK-SAME: (float nofpclass(snan inf sub) [[ARG0:%.*]]) #[[ATTR5:[0-9]+]] {
59-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf sub) float @llvm.canonicalize.f32(float [[ARG0]]) #[[ATTR12]]
58+
; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR5:[0-9]+]] {
59+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf sub) float @llvm.canonicalize.f32(float nofpclass(inf) [[ARG0]]) #[[ATTR12]]
6060
; CHECK-NEXT: ret float [[CALL]]
6161
;
6262
%call = call float @llvm.canonicalize.f32(float %arg0)
@@ -65,8 +65,8 @@ define float @ret_canonicalize_ftpz_dapz_denormal(float nofpclass(inf) %arg0) "d
6565

6666
define float @ret_canonicalize_ftpz_ieee_denormal(float nofpclass(inf) %arg0) "denormal-fp-math"="positive-zero,ieee" {
6767
; CHECK-LABEL: define nofpclass(snan inf nzero sub) float @ret_canonicalize_ftpz_ieee_denormal
68-
; CHECK-SAME: (float nofpclass(snan inf nzero sub) [[ARG0:%.*]]) #[[ATTR6:[0-9]+]] {
69-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf nzero sub) float @llvm.canonicalize.f32(float [[ARG0]]) #[[ATTR12]]
68+
; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR6:[0-9]+]] {
69+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf nzero sub) float @llvm.canonicalize.f32(float nofpclass(inf) [[ARG0]]) #[[ATTR12]]
7070
; CHECK-NEXT: ret float [[CALL]]
7171
;
7272
%call = call float @llvm.canonicalize.f32(float %arg0)
@@ -75,8 +75,8 @@ define float @ret_canonicalize_ftpz_ieee_denormal(float nofpclass(inf) %arg0) "d
7575

7676
define float @ret_canonicalize_ftpz_dynamic_denormal(float nofpclass(inf) %arg0) "denormal-fp-math"="positive-zero,dynamic" {
7777
; CHECK-LABEL: define nofpclass(snan inf sub) float @ret_canonicalize_ftpz_dynamic_denormal
78-
; CHECK-SAME: (float nofpclass(snan inf sub) [[ARG0:%.*]]) #[[ATTR7:[0-9]+]] {
79-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf sub) float @llvm.canonicalize.f32(float [[ARG0]]) #[[ATTR12]]
78+
; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR7:[0-9]+]] {
79+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf sub) float @llvm.canonicalize.f32(float nofpclass(inf) [[ARG0]]) #[[ATTR12]]
8080
; CHECK-NEXT: ret float [[CALL]]
8181
;
8282
%call = call float @llvm.canonicalize.f32(float %arg0)
@@ -85,8 +85,8 @@ define float @ret_canonicalize_ftpz_dynamic_denormal(float nofpclass(inf) %arg0)
8585

8686
define float @ret_canonicalize_ftz_denormal(float nofpclass(inf) %arg0) "denormal-fp-math"="preserve-sign,dynamic" {
8787
; CHECK-LABEL: define nofpclass(snan inf sub) float @ret_canonicalize_ftz_denormal
88-
; CHECK-SAME: (float nofpclass(snan inf sub) [[ARG0:%.*]]) #[[ATTR8:[0-9]+]] {
89-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf sub) float @llvm.canonicalize.f32(float [[ARG0]]) #[[ATTR12]]
88+
; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR8:[0-9]+]] {
89+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf sub) float @llvm.canonicalize.f32(float nofpclass(inf) [[ARG0]]) #[[ATTR12]]
9090
; CHECK-NEXT: ret float [[CALL]]
9191
;
9292
%call = call float @llvm.canonicalize.f32(float %arg0)
@@ -95,8 +95,8 @@ define float @ret_canonicalize_ftz_denormal(float nofpclass(inf) %arg0) "denorma
9595

9696
define float @ret_canonicalize_ieee_denormal(float nofpclass(inf) %arg0) "denormal-fp-math"="ieee,ieee" {
9797
; CHECK-LABEL: define nofpclass(snan inf) float @ret_canonicalize_ieee_denormal
98-
; CHECK-SAME: (float nofpclass(snan inf) [[ARG0:%.*]]) #[[ATTR9:[0-9]+]] {
99-
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf) float @llvm.canonicalize.f32(float [[ARG0]]) #[[ATTR12]]
98+
; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR9:[0-9]+]] {
99+
; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan inf) float @llvm.canonicalize.f32(float nofpclass(inf) [[ARG0]]) #[[ATTR12]]
100100
; CHECK-NEXT: ret float [[CALL]]
101101
;
102102
%call = call float @llvm.canonicalize.f32(float %arg0)

0 commit comments

Comments
 (0)