Skip to content

Commit a5cc2af

Browse files
committed
switch to unaryBits
1 parent 70734ce commit a5cc2af

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

llvm/lib/Target/DirectX/DXIL.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ def CBits : DXILOp<31, unary> {
564564
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
565565
}
566566

567-
def FirstbitHi : DXILOp<33, unary> {
567+
def FirstbitHi : DXILOp<33, unaryBits> {
568568
let Doc = "Returns the location of the first set bit starting from "
569569
"the highest order bit and working downward.";
570570
let LLVMIntrinsic = int_dx_firstbituhigh;
@@ -576,7 +576,7 @@ def FirstbitHi : DXILOp<33, unary> {
576576
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
577577
}
578578

579-
def FirstbitSHi : DXILOp<34, unary> {
579+
def FirstbitSHi : DXILOp<34, unaryBits> {
580580
let Doc = "Returns the location of the first set bit from "
581581
"the highest order bit based on the sign.";
582582
let LLVMIntrinsic = int_dx_firstbitshigh;

llvm/test/CodeGen/DirectX/firstbithigh.ll

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,56 +4,56 @@
44

55
define noundef i32 @test_firstbithigh_ushort(i16 noundef %a) {
66
entry:
7-
; CHECK: call i32 @dx.op.unary.i16(i32 33, i16 %{{.*}})
7+
; CHECK: call i32 @dx.op.unaryBits.i16(i32 33, i16 %{{.*}})
88
%elt.firstbithigh = call i32 @llvm.dx.firstbituhigh.i16(i16 %a)
99
ret i32 %elt.firstbithigh
1010
}
1111

1212
define noundef i32 @test_firstbithigh_short(i16 noundef %a) {
1313
entry:
14-
; CHECK: call i32 @dx.op.unary.i16(i32 34, i16 %{{.*}})
14+
; CHECK: call i32 @dx.op.unaryBits.i16(i32 34, i16 %{{.*}})
1515
%elt.firstbithigh = call i32 @llvm.dx.firstbitshigh.i16(i16 %a)
1616
ret i32 %elt.firstbithigh
1717
}
1818

1919
define noundef i32 @test_firstbithigh_uint(i32 noundef %a) {
2020
entry:
21-
; CHECK: call i32 @dx.op.unary.i32(i32 33, i32 %{{.*}})
21+
; CHECK: call i32 @dx.op.unaryBits.i32(i32 33, i32 %{{.*}})
2222
%elt.firstbithigh = call i32 @llvm.dx.firstbituhigh.i32(i32 %a)
2323
ret i32 %elt.firstbithigh
2424
}
2525

2626
define noundef i32 @test_firstbithigh_int(i32 noundef %a) {
2727
entry:
28-
; CHECK: call i32 @dx.op.unary.i32(i32 34, i32 %{{.*}})
28+
; CHECK: call i32 @dx.op.unaryBits.i32(i32 34, i32 %{{.*}})
2929
%elt.firstbithigh = call i32 @llvm.dx.firstbitshigh.i32(i32 %a)
3030
ret i32 %elt.firstbithigh
3131
}
3232

3333
define noundef i32 @test_firstbithigh_ulong(i64 noundef %a) {
3434
entry:
35-
; CHECK: call i32 @dx.op.unary.i64(i32 33, i64 %{{.*}})
35+
; CHECK: call i32 @dx.op.unaryBits.i64(i32 33, i64 %{{.*}})
3636
%elt.firstbithigh = call i32 @llvm.dx.firstbituhigh.i64(i64 %a)
3737
ret i32 %elt.firstbithigh
3838
}
3939

4040
define noundef i32 @test_firstbithigh_long(i64 noundef %a) {
4141
entry:
42-
; CHECK: call i32 @dx.op.unary.i64(i32 34, i64 %{{.*}})
42+
; CHECK: call i32 @dx.op.unaryBits.i64(i32 34, i64 %{{.*}})
4343
%elt.firstbithigh = call i32 @llvm.dx.firstbitshigh.i64(i64 %a)
4444
ret i32 %elt.firstbithigh
4545
}
4646

4747
define noundef <4 x i32> @test_firstbituhigh_vec4_i32(<4 x i32> noundef %a) {
4848
entry:
4949
; CHECK: [[ee0:%.*]] = extractelement <4 x i32> %a, i64 0
50-
; CHECK: [[ie0:%.*]] = call i32 @dx.op.unary.i32(i32 33, i32 [[ee0]])
50+
; CHECK: [[ie0:%.*]] = call i32 @dx.op.unaryBits.i32(i32 33, i32 [[ee0]])
5151
; CHECK: [[ee1:%.*]] = extractelement <4 x i32> %a, i64 1
52-
; CHECK: [[ie1:%.*]] = call i32 @dx.op.unary.i32(i32 33, i32 [[ee1]])
52+
; CHECK: [[ie1:%.*]] = call i32 @dx.op.unaryBits.i32(i32 33, i32 [[ee1]])
5353
; CHECK: [[ee2:%.*]] = extractelement <4 x i32> %a, i64 2
54-
; CHECK: [[ie2:%.*]] = call i32 @dx.op.unary.i32(i32 33, i32 [[ee2]])
54+
; CHECK: [[ie2:%.*]] = call i32 @dx.op.unaryBits.i32(i32 33, i32 [[ee2]])
5555
; CHECK: [[ee3:%.*]] = extractelement <4 x i32> %a, i64 3
56-
; CHECK: [[ie3:%.*]] = call i32 @dx.op.unary.i32(i32 33, i32 [[ee3]])
56+
; CHECK: [[ie3:%.*]] = call i32 @dx.op.unaryBits.i32(i32 33, i32 [[ee3]])
5757
; CHECK: insertelement <4 x i32> poison, i32 [[ie0]], i64 0
5858
; CHECK: insertelement <4 x i32> %{{.*}}, i32 [[ie1]], i64 1
5959
; CHECK: insertelement <4 x i32> %{{.*}}, i32 [[ie2]], i64 2
@@ -65,13 +65,13 @@ entry:
6565
define noundef <4 x i32> @test_firstbitshigh_vec4_i32(<4 x i32> noundef %a) {
6666
entry:
6767
; CHECK: [[ee0:%.*]] = extractelement <4 x i32> %a, i64 0
68-
; CHECK: [[ie0:%.*]] = call i32 @dx.op.unary.i32(i32 34, i32 [[ee0]])
68+
; CHECK: [[ie0:%.*]] = call i32 @dx.op.unaryBits.i32(i32 34, i32 [[ee0]])
6969
; CHECK: [[ee1:%.*]] = extractelement <4 x i32> %a, i64 1
70-
; CHECK: [[ie1:%.*]] = call i32 @dx.op.unary.i32(i32 34, i32 [[ee1]])
70+
; CHECK: [[ie1:%.*]] = call i32 @dx.op.unaryBits.i32(i32 34, i32 [[ee1]])
7171
; CHECK: [[ee2:%.*]] = extractelement <4 x i32> %a, i64 2
72-
; CHECK: [[ie2:%.*]] = call i32 @dx.op.unary.i32(i32 34, i32 [[ee2]])
72+
; CHECK: [[ie2:%.*]] = call i32 @dx.op.unaryBits.i32(i32 34, i32 [[ee2]])
7373
; CHECK: [[ee3:%.*]] = extractelement <4 x i32> %a, i64 3
74-
; CHECK: [[ie3:%.*]] = call i32 @dx.op.unary.i32(i32 34, i32 [[ee3]])
74+
; CHECK: [[ie3:%.*]] = call i32 @dx.op.unaryBits.i32(i32 34, i32 [[ee3]])
7575
; CHECK: insertelement <4 x i32> poison, i32 [[ie0]], i64 0
7676
; CHECK: insertelement <4 x i32> %{{.*}}, i32 [[ie1]], i64 1
7777
; CHECK: insertelement <4 x i32> %{{.*}}, i32 [[ie2]], i64 2

0 commit comments

Comments
 (0)