@@ -302,7 +302,8 @@ define half @test_rootn_f16_neg1(half %x) {
302
302
define half @test_rootn_f16_neg2 (half %x ) {
303
303
; CHECK-LABEL: define half @test_rootn_f16_neg2(
304
304
; CHECK-SAME: half [[X:%.*]]) {
305
- ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = call half @_Z5rsqrtDh(half [[X]])
305
+ ; CHECK-NEXT: [[TMP1:%.*]] = call contract half @llvm.sqrt.f16(half [[X]])
306
+ ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = fdiv contract half 0xH3C00, [[TMP1]], !fpmath [[META0]]
306
307
; CHECK-NEXT: ret half [[__ROOTN2RSQRT]]
307
308
;
308
309
%call = tail call half @_Z5rootnDhi (half %x , i32 -2 )
@@ -371,7 +372,8 @@ define <2 x half> @test_rootn_v2f16_neg1(<2 x half> %x) {
371
372
define <2 x half > @test_rootn_v2f16_neg2 (<2 x half > %x ) {
372
373
; CHECK-LABEL: define <2 x half> @test_rootn_v2f16_neg2(
373
374
; CHECK-SAME: <2 x half> [[X:%.*]]) {
374
- ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = call <2 x half> @_Z5rsqrtDv2_Dh(<2 x half> [[X]])
375
+ ; CHECK-NEXT: [[TMP1:%.*]] = call contract <2 x half> @llvm.sqrt.v2f16(<2 x half> [[X]])
376
+ ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = fdiv contract <2 x half> <half 0xH3C00, half 0xH3C00>, [[TMP1]], !fpmath [[META0]]
375
377
; CHECK-NEXT: ret <2 x half> [[__ROOTN2RSQRT]]
376
378
;
377
379
%call = tail call <2 x half > @_Z5rootnDv2_DhDv2_i (<2 x half > %x , <2 x i32 > <i32 -2 , i32 -2 >)
@@ -865,7 +867,8 @@ define float @test_rootn_f32__y_neg2(float %x) {
865
867
; CHECK-LABEL: define float @test_rootn_f32__y_neg2(
866
868
; CHECK-SAME: float [[X:%.*]]) {
867
869
; CHECK-NEXT: entry:
868
- ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = call float @_Z5rsqrtf(float [[X]])
870
+ ; CHECK-NEXT: [[TMP0:%.*]] = call contract float @llvm.sqrt.f32(float [[X]])
871
+ ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = fdiv contract float 1.000000e+00, [[TMP0]], !fpmath [[META0]]
869
872
; CHECK-NEXT: ret float [[__ROOTN2RSQRT]]
870
873
;
871
874
entry:
@@ -877,7 +880,8 @@ define float @test_rootn_f32__y_neg2__flags(float %x) {
877
880
; CHECK-LABEL: define float @test_rootn_f32__y_neg2__flags(
878
881
; CHECK-SAME: float [[X:%.*]]) {
879
882
; CHECK-NEXT: entry:
880
- ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = call nnan nsz float @_Z5rsqrtf(float [[X]])
883
+ ; CHECK-NEXT: [[TMP0:%.*]] = call nnan nsz contract float @llvm.sqrt.f32(float [[X]])
884
+ ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = fdiv nnan nsz contract float 1.000000e+00, [[TMP0]], !fpmath [[META0]]
881
885
; CHECK-NEXT: ret float [[__ROOTN2RSQRT]]
882
886
;
883
887
entry:
@@ -889,7 +893,7 @@ define float @test_rootn_f32__y_neg2__strictfp(float %x) #1 {
889
893
; CHECK-LABEL: define float @test_rootn_f32__y_neg2__strictfp(
890
894
; CHECK-SAME: float [[X:%.*]]) #[[ATTR0]] {
891
895
; CHECK-NEXT: entry:
892
- ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = call float @_Z5rsqrtf (float [[X]]) #[[ATTR0]]
896
+ ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = tail call float @_Z5rootnfi (float [[X]], i32 -2 ) #[[ATTR0]]
893
897
; CHECK-NEXT: ret float [[__ROOTN2RSQRT]]
894
898
;
895
899
entry:
@@ -901,7 +905,7 @@ define float @test_rootn_f32__y_neg2__noinline(float %x) {
901
905
; CHECK-LABEL: define float @test_rootn_f32__y_neg2__noinline(
902
906
; CHECK-SAME: float [[X:%.*]]) {
903
907
; CHECK-NEXT: entry:
904
- ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = call float @_Z5rsqrtf (float [[X]])
908
+ ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = tail call float @_Z5rootnfi (float [[X]], i32 -2) #[[ATTR3:[0-9]+]]
905
909
; CHECK-NEXT: ret float [[__ROOTN2RSQRT]]
906
910
;
907
911
entry:
@@ -913,7 +917,7 @@ define float @test_rootn_f32__y_neg2__nobuiltin(float %x) {
913
917
; CHECK-LABEL: define float @test_rootn_f32__y_neg2__nobuiltin(
914
918
; CHECK-SAME: float [[X:%.*]]) {
915
919
; CHECK-NEXT: entry:
916
- ; CHECK-NEXT: [[CALL:%.*]] = tail call float @_Z5rootnfi(float [[X]], i32 -2) #[[ATTR3 :[0-9]+]]
920
+ ; CHECK-NEXT: [[CALL:%.*]] = tail call float @_Z5rootnfi(float [[X]], i32 -2) #[[ATTR4 :[0-9]+]]
917
921
; CHECK-NEXT: ret float [[CALL]]
918
922
;
919
923
entry:
@@ -925,7 +929,8 @@ define <2 x float> @test_rootn_v2f32__y_neg2(<2 x float> %x) {
925
929
; CHECK-LABEL: define <2 x float> @test_rootn_v2f32__y_neg2(
926
930
; CHECK-SAME: <2 x float> [[X:%.*]]) {
927
931
; CHECK-NEXT: entry:
928
- ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = call <2 x float> @_Z5rsqrtDv2_f(<2 x float> [[X]])
932
+ ; CHECK-NEXT: [[TMP0:%.*]] = call contract <2 x float> @llvm.sqrt.v2f32(<2 x float> [[X]])
933
+ ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = fdiv contract <2 x float> <float 1.000000e+00, float 1.000000e+00>, [[TMP0]], !fpmath [[META0]]
929
934
; CHECK-NEXT: ret <2 x float> [[__ROOTN2RSQRT]]
930
935
;
931
936
entry:
@@ -937,7 +942,8 @@ define <2 x float> @test_rootn_v2f32__y_neg2__flags(<2 x float> %x) {
937
942
; CHECK-LABEL: define <2 x float> @test_rootn_v2f32__y_neg2__flags(
938
943
; CHECK-SAME: <2 x float> [[X:%.*]]) {
939
944
; CHECK-NEXT: entry:
940
- ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = call nnan nsz <2 x float> @_Z5rsqrtDv2_f(<2 x float> [[X]])
945
+ ; CHECK-NEXT: [[TMP0:%.*]] = call nnan nsz contract <2 x float> @llvm.sqrt.v2f32(<2 x float> [[X]])
946
+ ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = fdiv nnan nsz contract <2 x float> <float 1.000000e+00, float 1.000000e+00>, [[TMP0]], !fpmath [[META0]]
941
947
; CHECK-NEXT: ret <2 x float> [[__ROOTN2RSQRT]]
942
948
;
943
949
entry:
@@ -949,7 +955,7 @@ define <2 x float> @test_rootn_v2f32__y_neg2__strictfp(<2 x float> %x) #1 {
949
955
; CHECK-LABEL: define <2 x float> @test_rootn_v2f32__y_neg2__strictfp(
950
956
; CHECK-SAME: <2 x float> [[X:%.*]]) #[[ATTR0]] {
951
957
; CHECK-NEXT: entry:
952
- ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = call <2 x float> @_Z5rsqrtDv2_f (<2 x float> [[X]]) #[[ATTR0]]
958
+ ; CHECK-NEXT: [[__ROOTN2RSQRT:%.*]] = tail call <2 x float> @_Z5rootnDv2_fDv2_i (<2 x float> [[X]], <2 x i32> <i32 -2, i32 -2> ) #[[ATTR0]]
953
959
; CHECK-NEXT: ret <2 x float> [[__ROOTN2RSQRT]]
954
960
;
955
961
entry:
@@ -1125,7 +1131,7 @@ define float @test_rootn_fast_f32_nobuiltin(float %x, i32 %y) {
1125
1131
; CHECK-LABEL: define float @test_rootn_fast_f32_nobuiltin(
1126
1132
; CHECK-SAME: float [[X:%.*]], i32 [[Y:%.*]]) {
1127
1133
; CHECK-NEXT: entry:
1128
- ; CHECK-NEXT: [[CALL:%.*]] = tail call fast float @_Z5rootnfi(float [[X]], i32 [[Y]]) #[[ATTR3 ]]
1134
+ ; CHECK-NEXT: [[CALL:%.*]] = tail call fast float @_Z5rootnfi(float [[X]], i32 [[Y]]) #[[ATTR4 ]]
1129
1135
; CHECK-NEXT: ret float [[CALL]]
1130
1136
;
1131
1137
entry:
@@ -1420,7 +1426,7 @@ entry:
1420
1426
define float @test_rootn_f32__y_0_nobuiltin (float %x ) {
1421
1427
; CHECK-LABEL: define float @test_rootn_f32__y_0_nobuiltin(
1422
1428
; CHECK-SAME: float [[X:%.*]]) {
1423
- ; CHECK-NEXT: [[CALL:%.*]] = tail call float @_Z5rootnfi(float [[X]], i32 0) #[[ATTR3 ]]
1429
+ ; CHECK-NEXT: [[CALL:%.*]] = tail call float @_Z5rootnfi(float [[X]], i32 0) #[[ATTR4 ]]
1424
1430
; CHECK-NEXT: ret float [[CALL]]
1425
1431
;
1426
1432
%call = tail call float @_Z5rootnfi (float %x , i32 0 ) #0
@@ -1430,7 +1436,7 @@ define float @test_rootn_f32__y_0_nobuiltin(float %x) {
1430
1436
define float @test_rootn_f32__y_1_nobuiltin (float %x ) {
1431
1437
; CHECK-LABEL: define float @test_rootn_f32__y_1_nobuiltin(
1432
1438
; CHECK-SAME: float [[X:%.*]]) {
1433
- ; CHECK-NEXT: [[CALL:%.*]] = tail call float @_Z5rootnfi(float [[X]], i32 1) #[[ATTR3 ]]
1439
+ ; CHECK-NEXT: [[CALL:%.*]] = tail call float @_Z5rootnfi(float [[X]], i32 1) #[[ATTR4 ]]
1434
1440
; CHECK-NEXT: ret float [[CALL]]
1435
1441
;
1436
1442
%call = tail call float @_Z5rootnfi (float %x , i32 1 ) #0
@@ -1440,7 +1446,7 @@ define float @test_rootn_f32__y_1_nobuiltin(float %x) {
1440
1446
define float @test_rootn_f32__y_2_nobuiltin (float %x ) {
1441
1447
; CHECK-LABEL: define float @test_rootn_f32__y_2_nobuiltin(
1442
1448
; CHECK-SAME: float [[X:%.*]]) {
1443
- ; CHECK-NEXT: [[CALL:%.*]] = tail call float @_Z5rootnfi(float [[X]], i32 2) #[[ATTR3 ]]
1449
+ ; CHECK-NEXT: [[CALL:%.*]] = tail call float @_Z5rootnfi(float [[X]], i32 2) #[[ATTR4 ]]
1444
1450
; CHECK-NEXT: ret float [[CALL]]
1445
1451
;
1446
1452
%call = tail call float @_Z5rootnfi (float %x , i32 2 ) #0
@@ -1450,7 +1456,7 @@ define float @test_rootn_f32__y_2_nobuiltin(float %x) {
1450
1456
define float @test_rootn_f32__y_3_nobuiltin (float %x ) {
1451
1457
; CHECK-LABEL: define float @test_rootn_f32__y_3_nobuiltin(
1452
1458
; CHECK-SAME: float [[X:%.*]]) {
1453
- ; CHECK-NEXT: [[CALL:%.*]] = tail call float @_Z5rootnfi(float [[X]], i32 3) #[[ATTR3 ]]
1459
+ ; CHECK-NEXT: [[CALL:%.*]] = tail call float @_Z5rootnfi(float [[X]], i32 3) #[[ATTR4 ]]
1454
1460
; CHECK-NEXT: ret float [[CALL]]
1455
1461
;
1456
1462
%call = tail call float @_Z5rootnfi (float %x , i32 3 ) #0
@@ -1460,7 +1466,7 @@ define float @test_rootn_f32__y_3_nobuiltin(float %x) {
1460
1466
define float @test_rootn_f32__y_neg1_nobuiltin (float %x ) {
1461
1467
; CHECK-LABEL: define float @test_rootn_f32__y_neg1_nobuiltin(
1462
1468
; CHECK-SAME: float [[X:%.*]]) {
1463
- ; CHECK-NEXT: [[CALL:%.*]] = tail call float @_Z5rootnfi(float [[X]], i32 -1) #[[ATTR3 ]]
1469
+ ; CHECK-NEXT: [[CALL:%.*]] = tail call float @_Z5rootnfi(float [[X]], i32 -1) #[[ATTR4 ]]
1464
1470
; CHECK-NEXT: ret float [[CALL]]
1465
1471
;
1466
1472
%call = tail call float @_Z5rootnfi (float %x , i32 -1 ) #0
@@ -1470,7 +1476,7 @@ define float @test_rootn_f32__y_neg1_nobuiltin(float %x) {
1470
1476
define float @test_rootn_f32__y_neg2_nobuiltin (float %x ) {
1471
1477
; CHECK-LABEL: define float @test_rootn_f32__y_neg2_nobuiltin(
1472
1478
; CHECK-SAME: float [[X:%.*]]) {
1473
- ; CHECK-NEXT: [[CALL:%.*]] = tail call float @_Z5rootnfi(float [[X]], i32 -2) #[[ATTR3 ]]
1479
+ ; CHECK-NEXT: [[CALL:%.*]] = tail call float @_Z5rootnfi(float [[X]], i32 -2) #[[ATTR4 ]]
1474
1480
; CHECK-NEXT: ret float [[CALL]]
1475
1481
;
1476
1482
%call = tail call float @_Z5rootnfi (float %x , i32 -2 ) #0
@@ -1487,7 +1493,8 @@ attributes #2 = { noinline }
1487
1493
; CHECK: attributes #[[ATTR0]] = { strictfp }
1488
1494
; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
1489
1495
; CHECK: attributes #[[ATTR2:[0-9]+]] = { nounwind memory(read) }
1490
- ; CHECK: attributes #[[ATTR3]] = { nobuiltin }
1496
+ ; CHECK: attributes #[[ATTR3]] = { noinline }
1497
+ ; CHECK: attributes #[[ATTR4]] = { nobuiltin }
1491
1498
;.
1492
1499
; CHECK: [[META0]] = !{float 2.000000e+00}
1493
1500
; CHECK: [[META1]] = !{float 3.000000e+00}
0 commit comments