Skip to content

Commit 0b8fec6

Browse files
authored
[DirectX] Fix broken test and accidental fallthrough in #110616 (#111410)
Fix an obvious typo in these tests to get them passing, and also fix the -Wimplicit-fallthrough warning that fires when trying to build. Reverting #110616 was tricky because of dependencies, so I'm just doing the easy fix directly here.
1 parent 69577b2 commit 0b8fec6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ static bool expandIntrinsic(Function &F, CallInst *Orig) {
570570
break;
571571
case Intrinsic::dx_step:
572572
Result = expandStepIntrinsic(Orig);
573+
break;
573574
case Intrinsic::dx_radians:
574575
Result = expandRadiansIntrinsic(Orig);
575576
break;

llvm/test/CodeGen/DirectX/radians.ll

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ define noundef <4 x half> @radians_half_vector(<4 x half> noundef %a) {
4444
; CHECK: [[ee3:%.*]] = extractelement <4 x half> [[A]], i64 3
4545
; CHECK: [[ie3:%.*]] = fmul half [[ee3]], 0xH2478
4646
; CHECK: [[TMP0:%.*]] = insertelement <4 x half> poison, half [[ie0]], i64 0
47-
; CHECK: [[TMP1:%.*]] = insertelement <4 x half> %[[TMP0]], half [[ie1]], i64 1
48-
; CHECK: [[TMP2:%.*]] = insertelement <4 x half> %[[TMP1]], half [[ie2]], i64 2
49-
; CHECK: [[TMP3:%.*]] = insertelement <4 x half> %[[TMP2]], half [[ie3]], i64 3
47+
; CHECK: [[TMP1:%.*]] = insertelement <4 x half> [[TMP0]], half [[ie1]], i64 1
48+
; CHECK: [[TMP2:%.*]] = insertelement <4 x half> [[TMP1]], half [[ie2]], i64 2
49+
; CHECK: [[TMP3:%.*]] = insertelement <4 x half> [[TMP2]], half [[ie3]], i64 3
5050
; CHECK: ret <4 x half> [[TMP3]]
5151
;
5252
entry:
@@ -67,13 +67,12 @@ define noundef <4 x float> @radians_float_vector(<4 x float> noundef %a) {
6767
; CHECK: [[ee3:%.*]] = extractelement <4 x float> [[A]], i64 3
6868
; CHECK: [[ie3:%.*]] = fmul float [[ee3]], 0x3F91DF46A0000000
6969
; CHECK: [[TMP0:%.*]] = insertelement <4 x float> poison, float [[ie0]], i64 0
70-
; CHECK: [[TMP1:%.*]] = insertelement <4 x float> %[[TMP0]], float [[ie1]], i64 1
71-
; CHECK: [[TMP2:%.*]] = insertelement <4 x float> %[[TMP1]], float [[ie2]], i64 2
72-
; CHECK: [[TMP3:%.*]] = insertelement <4 x float> %[[TMP2]], float [[ie3]], i64 3
70+
; CHECK: [[TMP1:%.*]] = insertelement <4 x float> [[TMP0]], float [[ie1]], i64 1
71+
; CHECK: [[TMP2:%.*]] = insertelement <4 x float> [[TMP1]], float [[ie2]], i64 2
72+
; CHECK: [[TMP3:%.*]] = insertelement <4 x float> [[TMP2]], float [[ie3]], i64 3
7373
; CHECK: ret <4 x float> [[TMP3]]
7474
;
7575
entry:
7676
%elt.radians = call <4 x float> @llvm.dx.radians.v4f32(<4 x float> %a)
7777
ret <4 x float> %elt.radians
7878
}
79-

0 commit comments

Comments
 (0)