Skip to content

Commit d431547

Browse files
committed
fixup! [llvm][RISCV] Support RISCV vector tuple type in llvm IR
1 parent 2a82122 commit d431547

File tree

997 files changed

+141138
-141138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

997 files changed

+141138
-141138
lines changed

clang/lib/CodeGen/CodeGenTypes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) {
573573
Info.EC.getKnownMinValue() *
574574
ConvertType(Info.ElementType)->getScalarSizeInBits() / 8;
575575
return llvm::TargetExtType::get(
576-
getLLVMContext(), "riscv_vec_tuple",
576+
getLLVMContext(), "riscv.vector.tuple",
577577
llvm::ScalableVectorType::get(
578578
llvm::Type::getInt8Ty(getLLVMContext()), I8EltCount),
579579
Info.NumVectors);

clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/bfloat16/vcreate.c

Lines changed: 166 additions & 166 deletions
Large diffs are not rendered by default.

clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/bfloat16/vget.c

Lines changed: 50 additions & 50 deletions
Large diffs are not rendered by default.

clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/bfloat16/vloxseg2ei16.c

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,112 +8,112 @@
88

99
#include <riscv_vector.h>
1010

11-
// CHECK-RV64-LABEL: define dso_local target("riscv_vec_tuple", <vscale x 2 x i8>, 2) @test_vloxseg2ei16_v_bf16mf4x2(
11+
// CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 2 x i8>, 2) @test_vloxseg2ei16_v_bf16mf4x2(
1212
// CHECK-RV64-SAME: ptr noundef [[RS1:%.*]], <vscale x 1 x i16> [[RS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0:[0-9]+]] {
1313
// CHECK-RV64-NEXT: entry:
14-
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv_vec_tuple", <vscale x 2 x i8>, 2) @llvm.riscv.vloxseg2.triscv_vec_tuple_nxv2i8_2t.nxv1i16.i64(target("riscv_vec_tuple", <vscale x 2 x i8>, 2) poison, ptr [[RS1]], <vscale x 1 x i16> [[RS2]], i64 [[VL]], i64 0)
15-
// CHECK-RV64-NEXT: ret target("riscv_vec_tuple", <vscale x 2 x i8>, 2) [[TMP0]]
14+
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv.vector.tuple", <vscale x 2 x i8>, 2) @llvm.riscv.vloxseg2.triscv.vector.tuple_nxv2i8_2t.nxv1i16.i64(target("riscv.vector.tuple", <vscale x 2 x i8>, 2) poison, ptr [[RS1]], <vscale x 1 x i16> [[RS2]], i64 [[VL]], i64 0)
15+
// CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 2 x i8>, 2) [[TMP0]]
1616
//
1717
vbfloat16mf4x2_t test_vloxseg2ei16_v_bf16mf4x2(const __bf16 *rs1,
1818
vuint16mf4_t rs2, size_t vl) {
1919
return __riscv_vloxseg2ei16_v_bf16mf4x2(rs1, rs2, vl);
2020
}
2121

22-
// CHECK-RV64-LABEL: define dso_local target("riscv_vec_tuple", <vscale x 4 x i8>, 2) @test_vloxseg2ei16_v_bf16mf2x2(
22+
// CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 4 x i8>, 2) @test_vloxseg2ei16_v_bf16mf2x2(
2323
// CHECK-RV64-SAME: ptr noundef [[RS1:%.*]], <vscale x 2 x i16> [[RS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
2424
// CHECK-RV64-NEXT: entry:
25-
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv_vec_tuple", <vscale x 4 x i8>, 2) @llvm.riscv.vloxseg2.triscv_vec_tuple_nxv4i8_2t.nxv2i16.i64(target("riscv_vec_tuple", <vscale x 4 x i8>, 2) poison, ptr [[RS1]], <vscale x 2 x i16> [[RS2]], i64 [[VL]], i64 0)
26-
// CHECK-RV64-NEXT: ret target("riscv_vec_tuple", <vscale x 4 x i8>, 2) [[TMP0]]
25+
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv.vector.tuple", <vscale x 4 x i8>, 2) @llvm.riscv.vloxseg2.triscv.vector.tuple_nxv4i8_2t.nxv2i16.i64(target("riscv.vector.tuple", <vscale x 4 x i8>, 2) poison, ptr [[RS1]], <vscale x 2 x i16> [[RS2]], i64 [[VL]], i64 0)
26+
// CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 4 x i8>, 2) [[TMP0]]
2727
//
2828
vbfloat16mf2x2_t test_vloxseg2ei16_v_bf16mf2x2(const __bf16 *rs1,
2929
vuint16mf2_t rs2, size_t vl) {
3030
return __riscv_vloxseg2ei16_v_bf16mf2x2(rs1, rs2, vl);
3131
}
3232

33-
// CHECK-RV64-LABEL: define dso_local target("riscv_vec_tuple", <vscale x 8 x i8>, 2) @test_vloxseg2ei16_v_bf16m1x2(
33+
// CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 8 x i8>, 2) @test_vloxseg2ei16_v_bf16m1x2(
3434
// CHECK-RV64-SAME: ptr noundef [[RS1:%.*]], <vscale x 4 x i16> [[RS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
3535
// CHECK-RV64-NEXT: entry:
36-
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv_vec_tuple", <vscale x 8 x i8>, 2) @llvm.riscv.vloxseg2.triscv_vec_tuple_nxv8i8_2t.nxv4i16.i64(target("riscv_vec_tuple", <vscale x 8 x i8>, 2) poison, ptr [[RS1]], <vscale x 4 x i16> [[RS2]], i64 [[VL]], i64 0)
37-
// CHECK-RV64-NEXT: ret target("riscv_vec_tuple", <vscale x 8 x i8>, 2) [[TMP0]]
36+
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv.vector.tuple", <vscale x 8 x i8>, 2) @llvm.riscv.vloxseg2.triscv.vector.tuple_nxv8i8_2t.nxv4i16.i64(target("riscv.vector.tuple", <vscale x 8 x i8>, 2) poison, ptr [[RS1]], <vscale x 4 x i16> [[RS2]], i64 [[VL]], i64 0)
37+
// CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 8 x i8>, 2) [[TMP0]]
3838
//
3939
vbfloat16m1x2_t test_vloxseg2ei16_v_bf16m1x2(const __bf16 *rs1, vuint16m1_t rs2,
4040
size_t vl) {
4141
return __riscv_vloxseg2ei16_v_bf16m1x2(rs1, rs2, vl);
4242
}
4343

44-
// CHECK-RV64-LABEL: define dso_local target("riscv_vec_tuple", <vscale x 16 x i8>, 2) @test_vloxseg2ei16_v_bf16m2x2(
44+
// CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 16 x i8>, 2) @test_vloxseg2ei16_v_bf16m2x2(
4545
// CHECK-RV64-SAME: ptr noundef [[RS1:%.*]], <vscale x 8 x i16> [[RS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
4646
// CHECK-RV64-NEXT: entry:
47-
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv_vec_tuple", <vscale x 16 x i8>, 2) @llvm.riscv.vloxseg2.triscv_vec_tuple_nxv16i8_2t.nxv8i16.i64(target("riscv_vec_tuple", <vscale x 16 x i8>, 2) poison, ptr [[RS1]], <vscale x 8 x i16> [[RS2]], i64 [[VL]], i64 0)
48-
// CHECK-RV64-NEXT: ret target("riscv_vec_tuple", <vscale x 16 x i8>, 2) [[TMP0]]
47+
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv.vector.tuple", <vscale x 16 x i8>, 2) @llvm.riscv.vloxseg2.triscv.vector.tuple_nxv16i8_2t.nxv8i16.i64(target("riscv.vector.tuple", <vscale x 16 x i8>, 2) poison, ptr [[RS1]], <vscale x 8 x i16> [[RS2]], i64 [[VL]], i64 0)
48+
// CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 16 x i8>, 2) [[TMP0]]
4949
//
5050
vbfloat16m2x2_t test_vloxseg2ei16_v_bf16m2x2(const __bf16 *rs1, vuint16m2_t rs2,
5151
size_t vl) {
5252
return __riscv_vloxseg2ei16_v_bf16m2x2(rs1, rs2, vl);
5353
}
5454

55-
// CHECK-RV64-LABEL: define dso_local target("riscv_vec_tuple", <vscale x 32 x i8>, 2) @test_vloxseg2ei16_v_bf16m4x2(
55+
// CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 32 x i8>, 2) @test_vloxseg2ei16_v_bf16m4x2(
5656
// CHECK-RV64-SAME: ptr noundef [[RS1:%.*]], <vscale x 16 x i16> [[RS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
5757
// CHECK-RV64-NEXT: entry:
58-
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv_vec_tuple", <vscale x 32 x i8>, 2) @llvm.riscv.vloxseg2.triscv_vec_tuple_nxv32i8_2t.nxv16i16.i64(target("riscv_vec_tuple", <vscale x 32 x i8>, 2) poison, ptr [[RS1]], <vscale x 16 x i16> [[RS2]], i64 [[VL]], i64 0)
59-
// CHECK-RV64-NEXT: ret target("riscv_vec_tuple", <vscale x 32 x i8>, 2) [[TMP0]]
58+
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv.vector.tuple", <vscale x 32 x i8>, 2) @llvm.riscv.vloxseg2.triscv.vector.tuple_nxv32i8_2t.nxv16i16.i64(target("riscv.vector.tuple", <vscale x 32 x i8>, 2) poison, ptr [[RS1]], <vscale x 16 x i16> [[RS2]], i64 [[VL]], i64 0)
59+
// CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 32 x i8>, 2) [[TMP0]]
6060
//
6161
vbfloat16m4x2_t test_vloxseg2ei16_v_bf16m4x2(const __bf16 *rs1, vuint16m4_t rs2,
6262
size_t vl) {
6363
return __riscv_vloxseg2ei16_v_bf16m4x2(rs1, rs2, vl);
6464
}
6565

66-
// CHECK-RV64-LABEL: define dso_local target("riscv_vec_tuple", <vscale x 2 x i8>, 2) @test_vloxseg2ei16_v_bf16mf4x2_m(
66+
// CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 2 x i8>, 2) @test_vloxseg2ei16_v_bf16mf4x2_m(
6767
// CHECK-RV64-SAME: <vscale x 1 x i1> [[VM:%.*]], ptr noundef [[RS1:%.*]], <vscale x 1 x i16> [[RS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
6868
// CHECK-RV64-NEXT: entry:
69-
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv_vec_tuple", <vscale x 2 x i8>, 2) @llvm.riscv.vloxseg2.mask.triscv_vec_tuple_nxv2i8_2t.nxv1i16.nxv1i1.i64(target("riscv_vec_tuple", <vscale x 2 x i8>, 2) poison, ptr [[RS1]], <vscale x 1 x i16> [[RS2]], <vscale x 1 x i1> [[VM]], i64 [[VL]], i64 3, i64 0)
70-
// CHECK-RV64-NEXT: ret target("riscv_vec_tuple", <vscale x 2 x i8>, 2) [[TMP0]]
69+
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv.vector.tuple", <vscale x 2 x i8>, 2) @llvm.riscv.vloxseg2.mask.triscv.vector.tuple_nxv2i8_2t.nxv1i16.nxv1i1.i64(target("riscv.vector.tuple", <vscale x 2 x i8>, 2) poison, ptr [[RS1]], <vscale x 1 x i16> [[RS2]], <vscale x 1 x i1> [[VM]], i64 [[VL]], i64 3, i64 0)
70+
// CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 2 x i8>, 2) [[TMP0]]
7171
//
7272
vbfloat16mf4x2_t test_vloxseg2ei16_v_bf16mf4x2_m(vbool64_t vm,
7373
const __bf16 *rs1,
7474
vuint16mf4_t rs2, size_t vl) {
7575
return __riscv_vloxseg2ei16_v_bf16mf4x2_m(vm, rs1, rs2, vl);
7676
}
7777

78-
// CHECK-RV64-LABEL: define dso_local target("riscv_vec_tuple", <vscale x 4 x i8>, 2) @test_vloxseg2ei16_v_bf16mf2x2_m(
78+
// CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 4 x i8>, 2) @test_vloxseg2ei16_v_bf16mf2x2_m(
7979
// CHECK-RV64-SAME: <vscale x 2 x i1> [[VM:%.*]], ptr noundef [[RS1:%.*]], <vscale x 2 x i16> [[RS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
8080
// CHECK-RV64-NEXT: entry:
81-
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv_vec_tuple", <vscale x 4 x i8>, 2) @llvm.riscv.vloxseg2.mask.triscv_vec_tuple_nxv4i8_2t.nxv2i16.nxv2i1.i64(target("riscv_vec_tuple", <vscale x 4 x i8>, 2) poison, ptr [[RS1]], <vscale x 2 x i16> [[RS2]], <vscale x 2 x i1> [[VM]], i64 [[VL]], i64 3, i64 0)
82-
// CHECK-RV64-NEXT: ret target("riscv_vec_tuple", <vscale x 4 x i8>, 2) [[TMP0]]
81+
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv.vector.tuple", <vscale x 4 x i8>, 2) @llvm.riscv.vloxseg2.mask.triscv.vector.tuple_nxv4i8_2t.nxv2i16.nxv2i1.i64(target("riscv.vector.tuple", <vscale x 4 x i8>, 2) poison, ptr [[RS1]], <vscale x 2 x i16> [[RS2]], <vscale x 2 x i1> [[VM]], i64 [[VL]], i64 3, i64 0)
82+
// CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 4 x i8>, 2) [[TMP0]]
8383
//
8484
vbfloat16mf2x2_t test_vloxseg2ei16_v_bf16mf2x2_m(vbool32_t vm,
8585
const __bf16 *rs1,
8686
vuint16mf2_t rs2, size_t vl) {
8787
return __riscv_vloxseg2ei16_v_bf16mf2x2_m(vm, rs1, rs2, vl);
8888
}
8989

90-
// CHECK-RV64-LABEL: define dso_local target("riscv_vec_tuple", <vscale x 8 x i8>, 2) @test_vloxseg2ei16_v_bf16m1x2_m(
90+
// CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 8 x i8>, 2) @test_vloxseg2ei16_v_bf16m1x2_m(
9191
// CHECK-RV64-SAME: <vscale x 4 x i1> [[VM:%.*]], ptr noundef [[RS1:%.*]], <vscale x 4 x i16> [[RS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
9292
// CHECK-RV64-NEXT: entry:
93-
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv_vec_tuple", <vscale x 8 x i8>, 2) @llvm.riscv.vloxseg2.mask.triscv_vec_tuple_nxv8i8_2t.nxv4i16.nxv4i1.i64(target("riscv_vec_tuple", <vscale x 8 x i8>, 2) poison, ptr [[RS1]], <vscale x 4 x i16> [[RS2]], <vscale x 4 x i1> [[VM]], i64 [[VL]], i64 3, i64 0)
94-
// CHECK-RV64-NEXT: ret target("riscv_vec_tuple", <vscale x 8 x i8>, 2) [[TMP0]]
93+
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv.vector.tuple", <vscale x 8 x i8>, 2) @llvm.riscv.vloxseg2.mask.triscv.vector.tuple_nxv8i8_2t.nxv4i16.nxv4i1.i64(target("riscv.vector.tuple", <vscale x 8 x i8>, 2) poison, ptr [[RS1]], <vscale x 4 x i16> [[RS2]], <vscale x 4 x i1> [[VM]], i64 [[VL]], i64 3, i64 0)
94+
// CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 8 x i8>, 2) [[TMP0]]
9595
//
9696
vbfloat16m1x2_t test_vloxseg2ei16_v_bf16m1x2_m(vbool16_t vm, const __bf16 *rs1,
9797
vuint16m1_t rs2, size_t vl) {
9898
return __riscv_vloxseg2ei16_v_bf16m1x2_m(vm, rs1, rs2, vl);
9999
}
100100

101-
// CHECK-RV64-LABEL: define dso_local target("riscv_vec_tuple", <vscale x 16 x i8>, 2) @test_vloxseg2ei16_v_bf16m2x2_m(
101+
// CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 16 x i8>, 2) @test_vloxseg2ei16_v_bf16m2x2_m(
102102
// CHECK-RV64-SAME: <vscale x 8 x i1> [[VM:%.*]], ptr noundef [[RS1:%.*]], <vscale x 8 x i16> [[RS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
103103
// CHECK-RV64-NEXT: entry:
104-
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv_vec_tuple", <vscale x 16 x i8>, 2) @llvm.riscv.vloxseg2.mask.triscv_vec_tuple_nxv16i8_2t.nxv8i16.nxv8i1.i64(target("riscv_vec_tuple", <vscale x 16 x i8>, 2) poison, ptr [[RS1]], <vscale x 8 x i16> [[RS2]], <vscale x 8 x i1> [[VM]], i64 [[VL]], i64 3, i64 0)
105-
// CHECK-RV64-NEXT: ret target("riscv_vec_tuple", <vscale x 16 x i8>, 2) [[TMP0]]
104+
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv.vector.tuple", <vscale x 16 x i8>, 2) @llvm.riscv.vloxseg2.mask.triscv.vector.tuple_nxv16i8_2t.nxv8i16.nxv8i1.i64(target("riscv.vector.tuple", <vscale x 16 x i8>, 2) poison, ptr [[RS1]], <vscale x 8 x i16> [[RS2]], <vscale x 8 x i1> [[VM]], i64 [[VL]], i64 3, i64 0)
105+
// CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 16 x i8>, 2) [[TMP0]]
106106
//
107107
vbfloat16m2x2_t test_vloxseg2ei16_v_bf16m2x2_m(vbool8_t vm, const __bf16 *rs1,
108108
vuint16m2_t rs2, size_t vl) {
109109
return __riscv_vloxseg2ei16_v_bf16m2x2_m(vm, rs1, rs2, vl);
110110
}
111111

112-
// CHECK-RV64-LABEL: define dso_local target("riscv_vec_tuple", <vscale x 32 x i8>, 2) @test_vloxseg2ei16_v_bf16m4x2_m(
112+
// CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 32 x i8>, 2) @test_vloxseg2ei16_v_bf16m4x2_m(
113113
// CHECK-RV64-SAME: <vscale x 16 x i1> [[VM:%.*]], ptr noundef [[RS1:%.*]], <vscale x 16 x i16> [[RS2:%.*]], i64 noundef [[VL:%.*]]) #[[ATTR0]] {
114114
// CHECK-RV64-NEXT: entry:
115-
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv_vec_tuple", <vscale x 32 x i8>, 2) @llvm.riscv.vloxseg2.mask.triscv_vec_tuple_nxv32i8_2t.nxv16i16.nxv16i1.i64(target("riscv_vec_tuple", <vscale x 32 x i8>, 2) poison, ptr [[RS1]], <vscale x 16 x i16> [[RS2]], <vscale x 16 x i1> [[VM]], i64 [[VL]], i64 3, i64 0)
116-
// CHECK-RV64-NEXT: ret target("riscv_vec_tuple", <vscale x 32 x i8>, 2) [[TMP0]]
115+
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call target("riscv.vector.tuple", <vscale x 32 x i8>, 2) @llvm.riscv.vloxseg2.mask.triscv.vector.tuple_nxv32i8_2t.nxv16i16.nxv16i1.i64(target("riscv.vector.tuple", <vscale x 32 x i8>, 2) poison, ptr [[RS1]], <vscale x 16 x i16> [[RS2]], <vscale x 16 x i1> [[VM]], i64 [[VL]], i64 3, i64 0)
116+
// CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 32 x i8>, 2) [[TMP0]]
117117
//
118118
vbfloat16m4x2_t test_vloxseg2ei16_v_bf16m4x2_m(vbool4_t vm, const __bf16 *rs1,
119119
vuint16m4_t rs2, size_t vl) {

0 commit comments

Comments
 (0)