[HLSL] Use hidden visibility for external linkage. (#140292)
Implements https://github.com/llvm/wg-hlsl/blob/main/proposals/0026-symbol-visibility.md. The change is to stop using the `hlsl.export` attribute. Instead, symbols with "program linkage" in HLSL will have export linkage with default visibility, and symbols with "external linkage" in HLSL will have export linkage with hidden visibility.
This commit is contained in:
@@ -471,14 +471,6 @@ void CGHLSLRuntime::emitEntryFunction(const FunctionDecl *FD,
|
||||
}
|
||||
}
|
||||
|
||||
void CGHLSLRuntime::setHLSLFunctionAttributes(const FunctionDecl *FD,
|
||||
llvm::Function *Fn) {
|
||||
if (FD->isInExportDeclContext()) {
|
||||
const StringRef ExportAttrKindStr = "hlsl.export";
|
||||
Fn->addFnAttr(ExportAttrKindStr);
|
||||
}
|
||||
}
|
||||
|
||||
static void gatherFunctions(SmallVectorImpl<Function *> &Fns, llvm::Module &M,
|
||||
bool CtorOrDtor) {
|
||||
const auto *GV =
|
||||
|
||||
@@ -1267,7 +1267,6 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,
|
||||
if (FD->hasAttr<HLSLShaderAttr>()) {
|
||||
CGM.getHLSLRuntime().emitEntryFunction(FD, Fn);
|
||||
}
|
||||
CGM.getHLSLRuntime().setHLSLFunctionAttributes(FD, Fn);
|
||||
}
|
||||
|
||||
EmitFunctionProlog(*CurFnInfo, CurFn, Args);
|
||||
|
||||
@@ -1666,6 +1666,11 @@ void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV,
|
||||
return;
|
||||
}
|
||||
|
||||
if (Context.getLangOpts().HLSL && !D->isInExportDeclContext()) {
|
||||
GV->setVisibility(llvm::GlobalValue::HiddenVisibility);
|
||||
return;
|
||||
}
|
||||
|
||||
if (GV->hasDLLExportStorageClass() || GV->hasDLLImportStorageClass()) {
|
||||
// Reject incompatible dlllstorage and visibility annotations.
|
||||
if (!LV.isVisibilityExplicit())
|
||||
|
||||
@@ -7,10 +7,10 @@ struct S {
|
||||
|
||||
// CHECK: [[CBLayout:%.*]] = type <{ [2 x float], [2 x <4 x i32>], [2 x [2 x i32]], [1 x target("dx.Layout", %S, 8, 0, 4)] }>
|
||||
// CHECK: @CBArrays.cb = global target("dx.CBuffer", target("dx.Layout", [[CBLayout]], 136, 0, 32, 64, 128))
|
||||
// CHECK: @c1 = external addrspace(2) global [2 x float], align 4
|
||||
// CHECK: @c2 = external addrspace(2) global [2 x <4 x i32>], align 16
|
||||
// CHECK: @c3 = external addrspace(2) global [2 x [2 x i32]], align 4
|
||||
// CHECK: @c4 = external addrspace(2) global [1 x target("dx.Layout", %S, 8, 0, 4)], align 1
|
||||
// CHECK: @c1 = external hidden addrspace(2) global [2 x float], align 4
|
||||
// CHECK: @c2 = external hidden addrspace(2) global [2 x <4 x i32>], align 16
|
||||
// CHECK: @c3 = external hidden addrspace(2) global [2 x [2 x i32]], align 4
|
||||
// CHECK: @c4 = external hidden addrspace(2) global [1 x target("dx.Layout", %S, 8, 0, 4)], align 1
|
||||
|
||||
cbuffer CBArrays : register(b0) {
|
||||
float c1[2];
|
||||
@@ -19,7 +19,7 @@ cbuffer CBArrays : register(b0) {
|
||||
S c4[1];
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}arr_assign1
|
||||
// CHECK-LABEL: define hidden void {{.*}}arr_assign1
|
||||
// CHECK: [[Arr:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NEXT: [[Arr2:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NOT: alloca
|
||||
@@ -33,7 +33,7 @@ void arr_assign1() {
|
||||
Arr = Arr2;
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}arr_assign2
|
||||
// CHECK-LABEL: define hidden void {{.*}}arr_assign2
|
||||
// CHECK: [[Arr:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NEXT: [[Arr2:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NEXT: [[Arr3:%.*]] = alloca [2 x i32], align 4
|
||||
@@ -51,7 +51,7 @@ void arr_assign2() {
|
||||
Arr = Arr2 = Arr3;
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}arr_assign3
|
||||
// CHECK-LABEL: define hidden void {{.*}}arr_assign3
|
||||
// CHECK: [[Arr3:%.*]] = alloca [2 x [2 x i32]], align 4
|
||||
// CHECK-NEXT: [[Arr4:%.*]] = alloca [2 x [2 x i32]], align 4
|
||||
// CHECK-NOT: alloca
|
||||
@@ -65,7 +65,7 @@ void arr_assign3() {
|
||||
Arr2 = Arr3;
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}arr_assign4
|
||||
// CHECK-LABEL: define hidden void {{.*}}arr_assign4
|
||||
// CHECK: [[Arr:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NEXT: [[Arr2:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NOT: alloca
|
||||
@@ -81,7 +81,7 @@ void arr_assign4() {
|
||||
(Arr = Arr2)[0] = 6;
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}arr_assign5
|
||||
// CHECK-LABEL: define hidden void {{.*}}arr_assign5
|
||||
// CHECK: [[Arr:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NEXT: [[Arr2:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NEXT: [[Arr3:%.*]] = alloca [2 x i32], align 4
|
||||
@@ -101,7 +101,7 @@ void arr_assign5() {
|
||||
(Arr = Arr2 = Arr3)[0] = 6;
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}arr_assign6
|
||||
// CHECK-LABEL: define hidden void {{.*}}arr_assign6
|
||||
// CHECK: [[Arr3:%.*]] = alloca [2 x [2 x i32]], align 4
|
||||
// CHECK-NEXT: [[Arr4:%.*]] = alloca [2 x [2 x i32]], align 4
|
||||
// CHECK-NOT: alloca
|
||||
@@ -118,7 +118,7 @@ void arr_assign6() {
|
||||
(Arr = Arr2)[0][0] = 6;
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}arr_assign7
|
||||
// CHECK-LABEL: define hidden void {{.*}}arr_assign7
|
||||
// CHECK: [[Arr:%.*]] = alloca [2 x [2 x i32]], align 4
|
||||
// CHECK-NEXT: [[Arr2:%.*]] = alloca [2 x [2 x i32]], align 4
|
||||
// CHECK-NOT: alloca
|
||||
@@ -138,7 +138,7 @@ void arr_assign7() {
|
||||
|
||||
// Verify you can assign from a cbuffer array
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}arr_assign8
|
||||
// CHECK-LABEL: define hidden void {{.*}}arr_assign8
|
||||
// CHECK: [[C:%.*]] = alloca [2 x float], align 4
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[C]], ptr align 4 {{.*}}, i32 8, i1 false)
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p2.i32(ptr align 4 [[C]], ptr addrspace(2) align 4 @c1, i32 8, i1 false)
|
||||
@@ -148,7 +148,7 @@ void arr_assign8() {
|
||||
C = c1;
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}arr_assign9
|
||||
// CHECK-LABEL: define hidden void {{.*}}arr_assign9
|
||||
// CHECK: [[C:%.*]] = alloca [2 x <4 x i32>], align 16
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 16 [[C]], ptr align 16 {{.*}}, i32 32, i1 false)
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p2.i32(ptr align 16 [[C]], ptr addrspace(2) align 16 @c2, i32 32, i1 false)
|
||||
@@ -158,7 +158,7 @@ void arr_assign9() {
|
||||
C = c2;
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}arr_assign10
|
||||
// CHECK-LABEL: define hidden void {{.*}}arr_assign10
|
||||
// CHECK: [[C:%.*]] = alloca [2 x [2 x i32]], align 4
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[C]], ptr align 4 {{.*}}, i32 16, i1 false)
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p2.i32(ptr align 4 [[C]], ptr addrspace(2) align 4 @c3, i32 16, i1 false)
|
||||
@@ -168,7 +168,7 @@ void arr_assign10() {
|
||||
C = c3;
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}arr_assign11
|
||||
// CHECK-LABEL: define hidden void {{.*}}arr_assign11
|
||||
// CHECK: [[C:%.*]] = alloca [1 x %struct.S], align 1
|
||||
// CHECK: call void @llvm.memcpy.p0.p2.i32(ptr align 1 [[C]], ptr addrspace(2) align 1 @c4, i32 8, i1 false)
|
||||
// CHECK-NEXT: ret void
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
void fn(float x[2]) { }
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}call{{.*}}
|
||||
// CHECK-LABEL: define hidden void {{.*}}call{{.*}}
|
||||
// CHECK: [[Arr:%.*]] = alloca [2 x float]
|
||||
// CHECK: [[Tmp:%.*]] = alloca [2 x float]
|
||||
// CHECK: call void @llvm.memset.p0.i32(ptr align 4 [[Arr]], i8 0, i32 8, i1 false)
|
||||
@@ -21,7 +21,7 @@ struct Obj {
|
||||
|
||||
void fn2(Obj O[4]) { }
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}call2{{.*}}
|
||||
// CHECK-LABEL: define hidden void {{.*}}call2{{.*}}
|
||||
// CHECK: [[Arr:%.*]] = alloca [4 x %struct.Obj]
|
||||
// CHECK: [[Tmp:%.*]] = alloca [4 x %struct.Obj]
|
||||
// CHECK: call void @llvm.memset.p0.i32(ptr align 1 [[Arr]], i8 0, i32 32, i1 false)
|
||||
@@ -35,7 +35,7 @@ void call2() {
|
||||
|
||||
void fn3(float x[2][2]) { }
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}call3{{.*}}
|
||||
// CHECK-LABEL: define hidden void {{.*}}call3{{.*}}
|
||||
// CHECK: [[Arr:%.*]] = alloca [2 x [2 x float]]
|
||||
// CHECK: [[Tmp:%.*]] = alloca [2 x [2 x float]]
|
||||
// CHECK: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[Arr]], ptr align 4 {{.*}}, i32 16, i1 false)
|
||||
@@ -46,7 +46,7 @@ void call3() {
|
||||
fn3(Arr);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}call4{{.*}}(ptr
|
||||
// CHECK-LABEL: define hidden void {{.*}}call4{{.*}}(ptr
|
||||
// CHECK-SAME: noundef byval([2 x [2 x float]]) align 4 [[Arr:%.*]])
|
||||
// CHECK: [[Tmp:%.*]] = alloca [2 x [2 x float]]
|
||||
// CHECK: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[Tmp]], ptr align 4 [[Arr]], i32 16, i1 false)
|
||||
@@ -59,7 +59,7 @@ void call4(float Arr[2][2]) {
|
||||
// Verify that each template instantiation codegens to a unique and correctly
|
||||
// mangled function name.
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}template_call{{.*}}(ptr
|
||||
// CHECK-LABEL: define hidden void {{.*}}template_call{{.*}}(ptr
|
||||
|
||||
// CHECK-SAME: noundef byval([2 x float]) align 4 [[FA2:%[0-9A-Z]+]],
|
||||
// CHECK-SAME: ptr noundef byval([4 x float]) align 4 [[FA4:%[0-9A-Z]+]],
|
||||
@@ -86,7 +86,7 @@ void template_call(float FA2[2], float FA4[4], int IA3[3]) {
|
||||
|
||||
|
||||
// Verify that Array parameter element access correctly codegens.
|
||||
// CHECK-LABEL: define void {{.*}}element_access{{.*}}(ptr
|
||||
// CHECK-LABEL: define hidden void {{.*}}element_access{{.*}}(ptr
|
||||
// CHECK-SAME: noundef byval([2 x float]) align 4 [[FA2:%[0-9A-Z]+]]
|
||||
|
||||
// CHECK: [[Addr:%.*]] = getelementptr inbounds [2 x float], ptr [[FA2]], i32 0, i32 0
|
||||
|
||||
@@ -11,7 +11,7 @@ void increment(inout int Arr[2]) {
|
||||
// CHECK-NEXT: [[Tmp:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[A]], ptr align 4 @{{.*}}, i32 8, i1 false)
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[Tmp]], ptr align 4 [[A]], i32 8, i1 false)
|
||||
// CHECK-NEXT: call void @{{.*}}increment{{.*}}(ptr noalias noundef byval([2 x i32]) align 4 [[Tmp]]) #3
|
||||
// CHECK-NEXT: call void @{{.*}}increment{{.*}}(ptr noalias noundef byval([2 x i32]) align 4 [[Tmp]])
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[A]], ptr align 4 [[Tmp]], i32 8, i1 false)
|
||||
// CHECK-NEXT: [[Idx:%.*]] = getelementptr inbounds [2 x i32], ptr [[A]], i32 0, i32 0
|
||||
// CHECK-NEXT: [[B:%.*]] = load i32, ptr [[Idx]], align 4
|
||||
@@ -32,7 +32,7 @@ void fn2(out int Arr[2]) {
|
||||
// CHECK: [[A:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NEXT: [[Tmp:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[A]], ptr align 4 @{{.*}}, i32 8, i1 false)
|
||||
// CHECK-NEXT: call void @{{.*}}fn2{{.*}}(ptr noalias noundef byval([2 x i32]) align 4 [[Tmp]]) #3
|
||||
// CHECK-NEXT: call void @{{.*}}fn2{{.*}}(ptr noalias noundef byval([2 x i32]) align 4 [[Tmp]])
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[A]], ptr align 4 [[Tmp]], i32 8, i1 false)
|
||||
// CHECK-NEXT: [[Idx:%.*]] = getelementptr inbounds [2 x i32], ptr [[A]], i32 0, i32 0
|
||||
// CHECK-NEXT: [[B:%.*]] = load i32, ptr [[Idx]], align 4
|
||||
@@ -56,7 +56,7 @@ void nestedCall(inout int Arr[2], uint index) {
|
||||
// CHECK-NEXT: [[Tmp:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[A]], ptr align 4 @{{.*}}, i32 8, i1 false)
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[Tmp]], ptr align 4 [[A]], i32 8, i1 false)
|
||||
// CHECK-NEXT: call void @{{.*}}nestedCall{{.*}}(ptr noalias noundef byval([2 x i32]) align 4 [[Tmp]], i32 noundef 0) #3
|
||||
// CHECK-NEXT: call void @{{.*}}nestedCall{{.*}}(ptr noalias noundef byval([2 x i32]) align 4 [[Tmp]], i32 noundef 0)
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[A]], ptr align 4 [[Tmp]], i32 8, i1 false)
|
||||
// CHECK-NEXT: [[Idx:%.*]] = getelementptr inbounds [2 x i32], ptr [[A]], i32 0, i32 1
|
||||
// CHECK-NEXT: [[B:%.*]] = load i32, ptr [[Idx]], align 4
|
||||
@@ -70,7 +70,7 @@ export int arrayCall3() {
|
||||
// CHECK-LABEL: outerCall
|
||||
// CHECK: [[Tmp:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[Tmp]], ptr align 4 %{{.*}}, i32 8, i1 false)
|
||||
// CHECK-NEXT: call void {{.*}}increment{{.*}}(ptr noalias noundef byval([2 x i32]) align 4 [[Tmp]]) #3
|
||||
// CHECK-NEXT: call void {{.*}}increment{{.*}}(ptr noalias noundef byval([2 x i32]) align 4 [[Tmp]])
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 {{.*}}, ptr align 4 [[Tmp]], i32 8, i1 false)
|
||||
// CHECK-NEXT: ret void
|
||||
void outerCall(inout int Arr[2]) {
|
||||
@@ -82,7 +82,7 @@ void outerCall(inout int Arr[2]) {
|
||||
// CHECK-NEXT: [[Tmp:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[A]], ptr align 4 @{{.*}}, i32 8, i1 false)
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[Tmp]], ptr align 4 [[A]], i32 8, i1 false)
|
||||
// CHECK-NEXT: call void @{{.*}}outerCall{{.*}}(ptr noalias noundef byval([2 x i32]) align 4 [[Tmp]]) #3
|
||||
// CHECK-NEXT: call void @{{.*}}outerCall{{.*}}(ptr noalias noundef byval([2 x i32]) align 4 [[Tmp]])
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[A]], ptr align 4 [[Tmp]], i32 8, i1 false)
|
||||
// CHECK-NEXT: [[Idx:%.*]] = getelementptr inbounds [2 x i32], ptr [[A]], i32 0, i32 0
|
||||
// CHECK-NEXT: [[B:%.*]] = load i32, ptr [[Idx]], align 4
|
||||
@@ -99,7 +99,7 @@ void fn3(int Arr[2]) {}
|
||||
// CHECK-LABEL: outerCall2
|
||||
// CHECK: [[Tmp:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[Tmp]], ptr align 4 {{.*}}, i32 8, i1 false)
|
||||
// CHECK-NEXT: call void {{.*}}fn3{{.*}}(ptr noundef byval([2 x i32]) align 4 [[Tmp]]) #3
|
||||
// CHECK-NEXT: call void {{.*}}fn3{{.*}}(ptr noundef byval([2 x i32]) align 4 [[Tmp]])
|
||||
// CHECK-NEXT: ret void
|
||||
void outerCall2(inout int Arr[2]) {
|
||||
fn3(Arr);
|
||||
@@ -110,7 +110,7 @@ void outerCall2(inout int Arr[2]) {
|
||||
// CHECK-NEXT: [[Tmp:%.*]] = alloca [2 x i32], align 4
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[A]], ptr align 4 @{{.*}}, i32 8, i1 false)
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[Tmp]], ptr align 4 [[A]], i32 8, i1 false)
|
||||
// CHECK-NEXT: call void @{{.*}}outerCall2{{.*}}(ptr noalias noundef byval([2 x i32]) align 4 [[Tmp]]) #3
|
||||
// CHECK-NEXT: call void @{{.*}}outerCall2{{.*}}(ptr noalias noundef byval([2 x i32]) align 4 [[Tmp]])
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[A]], ptr align 4 [[Tmp]], i32 8, i1 false)
|
||||
// CHECK-NEXT: [[Idx:%.*]] = getelementptr inbounds [2 x i32], ptr [[A]], i32 0, i32 0
|
||||
// CHECK-NEXT: [[B:%.*]] = load i32, ptr [[Idx]], align 4
|
||||
|
||||
@@ -46,7 +46,7 @@ struct SlicyBits {
|
||||
};
|
||||
|
||||
// Case 1: Extraneous braces get ignored in literal instantiation.
|
||||
// CHECK-LABEL: define void @_Z5case1v(
|
||||
// CHECK-LABEL: define hidden void @_Z5case1v(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_TWOFLOATS:%.*]]) align 1 [[AGG_RESULT:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 1 [[AGG_RESULT]], ptr align 1 @__const._Z5case1v.TF1, i32 8, i1 false)
|
||||
@@ -58,7 +58,7 @@ TwoFloats case1() {
|
||||
}
|
||||
|
||||
// Case 2: Valid C/C++ initializer is handled appropriately.
|
||||
// CHECK-LABEL: define void @_Z5case2v(
|
||||
// CHECK-LABEL: define hidden void @_Z5case2v(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_TWOFLOATS:%.*]]) align 1 [[AGG_RESULT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 1 [[AGG_RESULT]], ptr align 1 @__const._Z5case2v.TF2, i32 8, i1 false)
|
||||
@@ -70,7 +70,7 @@ TwoFloats case2() {
|
||||
}
|
||||
|
||||
// Case 3: Simple initialization with conversion of an argument.
|
||||
// CHECK-LABEL: define void @_Z5case3i(
|
||||
// CHECK-LABEL: define hidden void @_Z5case3i(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_TWOFLOATS:%.*]]) align 1 [[AGG_RESULT:%.*]], i32 noundef [[VAL:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[VAL_ADDR:%.*]] = alloca i32, align 4
|
||||
@@ -90,7 +90,7 @@ TwoFloats case3(int Val) {
|
||||
|
||||
// Case 4: Initialization from a scalarized vector into a structure with element
|
||||
// conversions.
|
||||
// CHECK-LABEL: define void @_Z5case4Dv2_i(
|
||||
// CHECK-LABEL: define hidden void @_Z5case4Dv2_i(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_TWOFLOATS:%.*]]) align 1 [[AGG_RESULT:%.*]], <2 x i32> noundef [[TWOVALS:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[TWOVALS_ADDR:%.*]] = alloca <2 x i32>, align 8
|
||||
@@ -113,7 +113,7 @@ TwoFloats case4(int2 TwoVals) {
|
||||
}
|
||||
|
||||
// Case 5: Initialization from a scalarized vector of matching type.
|
||||
// CHECK-LABEL: define void @_Z5case5Dv2_i(
|
||||
// CHECK-LABEL: define hidden void @_Z5case5Dv2_i(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_TWOINTS:%.*]]) align 1 [[AGG_RESULT:%.*]], <2 x i32> noundef [[TWOVALS:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[TWOVALS_ADDR:%.*]] = alloca <2 x i32>, align 8
|
||||
@@ -135,7 +135,7 @@ TwoInts case5(int2 TwoVals) {
|
||||
|
||||
// Case 6: Initialization from a scalarized structure of different type with
|
||||
// different element types.
|
||||
// CHECK-LABEL: define void @_Z5case69TwoFloats(
|
||||
// CHECK-LABEL: define hidden void @_Z5case69TwoFloats(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_TWOINTS:%.*]]) align 1 [[AGG_RESULT:%.*]], ptr noundef byval([[STRUCT_TWOFLOATS:%.*]]) align 1 [[TF4:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[Z:%.*]] = getelementptr inbounds nuw [[STRUCT_TWOINTS]], ptr [[AGG_RESULT]], i32 0, i32 0
|
||||
@@ -157,7 +157,7 @@ TwoInts case6(TwoFloats TF4) {
|
||||
|
||||
// Case 7: Initialization of a complex structure, with bogus braces and element
|
||||
// conversions from a collection of scalar values, and structures.
|
||||
// CHECK-LABEL: define void @_Z5case77TwoIntsS_i9TwoFloatsS0_S0_S0_(
|
||||
// CHECK-LABEL: define hidden void @_Z5case77TwoIntsS_i9TwoFloatsS0_S0_S0_(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_DOGGO:%.*]]) align 1 [[AGG_RESULT:%.*]], ptr noundef byval([[STRUCT_TWOINTS:%.*]]) align 1 [[TI1:%.*]], ptr noundef byval([[STRUCT_TWOINTS]]) align 1 [[TI2:%.*]], i32 noundef [[VAL:%.*]], ptr noundef byval([[STRUCT_TWOFLOATS:%.*]]) align 1 [[TF1:%.*]], ptr noundef byval([[STRUCT_TWOFLOATS]]) align 1 [[TF2:%.*]], ptr noundef byval([[STRUCT_TWOFLOATS]]) align 1 [[TF3:%.*]], ptr noundef byval([[STRUCT_TWOFLOATS]]) align 1 [[TF4:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[VAL_ADDR:%.*]] = alloca i32, align 4
|
||||
@@ -221,7 +221,7 @@ Doggo case7(TwoInts TI1, TwoInts TI2, int Val, TwoFloats TF1, TwoFloats TF2,
|
||||
|
||||
// Case 8: Initialization of a structure from a different structure with
|
||||
// significantly different element types and grouping.
|
||||
// CHECK-LABEL: define void @_Z5case85Doggo(
|
||||
// CHECK-LABEL: define hidden void @_Z5case85Doggo(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_ANIMALBITS:%.*]]) align 1 [[AGG_RESULT:%.*]], ptr noundef byval([[STRUCT_DOGGO:%.*]]) align 1 [[D1:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[LEGS:%.*]] = getelementptr inbounds nuw [[STRUCT_ANIMALBITS]], ptr [[AGG_RESULT]], i32 0, i32 0
|
||||
@@ -307,7 +307,7 @@ AnimalBits case8(Doggo D1) {
|
||||
// Case 9: Everything everywhere all at once... Initializing mismatched
|
||||
// structures from different layouts, different component groupings, with no
|
||||
// top-level bracing separation.
|
||||
// CHECK-LABEL: define void @_Z5case95Doggo10AnimalBits(
|
||||
// CHECK-LABEL: define hidden void @_Z5case95Doggo10AnimalBits(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_ZOO:%.*]]) align 1 [[AGG_RESULT:%.*]], ptr noundef byval([[STRUCT_DOGGO:%.*]]) align 1 [[D1:%.*]], ptr noundef byval([[STRUCT_ANIMALBITS:%.*]]) align 1 [[A1:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[DOGS:%.*]] = getelementptr inbounds nuw [[STRUCT_ZOO]], ptr [[AGG_RESULT]], i32 0, i32 0
|
||||
@@ -723,7 +723,7 @@ Zoo case9(Doggo D1, AnimalBits A1) {
|
||||
}
|
||||
|
||||
// Case 10: Initialize an object with a base class from two objects.
|
||||
// CHECK-LABEL: define void @_Z6case109TwoFloatsS_(
|
||||
// CHECK-LABEL: define hidden void @_Z6case109TwoFloatsS_(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_FOURFLOATS:%.*]]) align 1 [[AGG_RESULT:%.*]], ptr noundef byval([[STRUCT_TWOFLOATS:%.*]]) align 1 [[TF1:%.*]], ptr noundef byval([[STRUCT_TWOFLOATS]]) align 1 [[TF2:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[X:%.*]] = getelementptr inbounds nuw [[STRUCT_TWOFLOATS]], ptr [[AGG_RESULT]], i32 0, i32 0
|
||||
@@ -750,7 +750,7 @@ FourFloats case10(TwoFloats TF1, TwoFloats TF2) {
|
||||
}
|
||||
|
||||
// Case 11: Initialize an object with a base class from a vector splat.
|
||||
// CHECK-LABEL: define void @_Z6case11f(
|
||||
// CHECK-LABEL: define hidden void @_Z6case11f(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_FOURFLOATS:%.*]]) align 1 [[AGG_RESULT:%.*]], float noundef nofpclass(nan inf) [[F:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[F_ADDR:%.*]] = alloca float, align 4
|
||||
@@ -799,7 +799,7 @@ FourFloats case11(float F) {
|
||||
}
|
||||
|
||||
// Case 12: Initialize bitfield from two integers.
|
||||
// CHECK-LABEL: define void @_Z6case12ii(
|
||||
// CHECK-LABEL: define hidden void @_Z6case12ii(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_SLICYBITS:%.*]]) align 1 [[AGG_RESULT:%.*]], i32 noundef [[I:%.*]], i32 noundef [[J:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[I_ADDR:%.*]] = alloca i32, align 4
|
||||
@@ -821,7 +821,7 @@ SlicyBits case12(int I, int J) {
|
||||
}
|
||||
|
||||
// Case 13: Initialize bitfield from a struct of two ints.
|
||||
// CHECK-LABEL: define void @_Z6case137TwoInts(
|
||||
// CHECK-LABEL: define hidden void @_Z6case137TwoInts(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_SLICYBITS:%.*]]) align 1 [[AGG_RESULT:%.*]], ptr noundef byval([[STRUCT_TWOINTS:%.*]]) align 1 [[TI:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[Z:%.*]] = getelementptr inbounds nuw [[STRUCT_TWOINTS]], ptr [[TI]], i32 0, i32 0
|
||||
@@ -841,7 +841,7 @@ SlicyBits case13(TwoInts TI) {
|
||||
}
|
||||
|
||||
// Case 14: Initialize struct of ints from struct with bitfields.
|
||||
// CHECK-LABEL: define void @_Z6case149SlicyBits(
|
||||
// CHECK-LABEL: define hidden void @_Z6case149SlicyBits(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_TWOINTS:%.*]]) align 1 [[AGG_RESULT:%.*]], ptr noundef byval([[STRUCT_SLICYBITS:%.*]]) align 1 [[SB:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[Z:%.*]] = getelementptr inbounds nuw [[STRUCT_TWOINTS]], ptr [[AGG_RESULT]], i32 0, i32 0
|
||||
@@ -861,7 +861,7 @@ TwoInts case14(SlicyBits SB) {
|
||||
}
|
||||
|
||||
// Case 15: Initialize struct of floats from struct with bitfields.
|
||||
// CHECK-LABEL: define void @_Z6case159SlicyBits(
|
||||
// CHECK-LABEL: define hidden void @_Z6case159SlicyBits(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_TWOFLOATS:%.*]]) align 1 [[AGG_RESULT:%.*]], ptr noundef byval([[STRUCT_SLICYBITS:%.*]]) align 1 [[SB:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[X:%.*]] = getelementptr inbounds nuw [[STRUCT_TWOFLOATS]], ptr [[AGG_RESULT]], i32 0, i32 0
|
||||
@@ -884,7 +884,7 @@ TwoFloats case15(SlicyBits SB) {
|
||||
|
||||
// Case 16: Side-effecting initialization list arguments. The important thing
|
||||
// here is that case16 only has _one_ call to makeTwo.
|
||||
// CHECK-LABEL: define void @_Z7makeTwoRf(
|
||||
// CHECK-LABEL: define hidden void @_Z7makeTwoRf(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_TWOFLOATS:%.*]]) align 1 [[AGG_RESULT:%.*]], ptr noalias noundef nonnull align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[X_ADDR:%.*]] = alloca ptr, align 4
|
||||
@@ -910,7 +910,7 @@ TwoFloats makeTwo(inout float X) {
|
||||
return TF;
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void @_Z6case16v(
|
||||
// CHECK-LABEL: define hidden void @_Z6case16v(
|
||||
// CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_FOURFLOATS:%.*]]) align 1 [[AGG_RESULT:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[X:%.*]] = alloca float, align 4
|
||||
@@ -948,7 +948,7 @@ int case17Helper(int x) {
|
||||
}
|
||||
|
||||
// InitList with OpaqueValueExpr
|
||||
// CHECK-LABEL: define void {{.*}}case17
|
||||
// CHECK-LABEL: define hidden void {{.*}}case17
|
||||
// CHECK: [[X:%.*]] = alloca <2 x i32>, align 8
|
||||
// CHECK-NEXT: [[C:%.*]] = call noundef i32 {{.*}}case17Helper{{.*}}(i32 noundef 0)
|
||||
// CHECK-NEXT: [[C1:%.*]] = call noundef i32 {{.*}}case17Helper{{.*}}(i32 noundef 1)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// integer. It is converted to an integer on call and converted back after the
|
||||
// function.
|
||||
|
||||
// CHECK: define void {{.*}}trunc_Param{{.*}}(ptr noalias noundef nonnull align 4 dereferenceable(4) {{%.*}})
|
||||
// CHECK: define hidden void {{.*}}trunc_Param{{.*}}(ptr noalias noundef nonnull align 4 dereferenceable(4) {{%.*}})
|
||||
void trunc_Param(inout int X) {}
|
||||
|
||||
// ALL-LABEL: define noundef nofpclass(nan inf) float {{.*}}case1
|
||||
@@ -32,7 +32,7 @@ export float case1(float F) {
|
||||
// uninitialized in the function. If they are not initialized before the
|
||||
// function returns the value is undefined.
|
||||
|
||||
// CHECK: define void {{.*}}undef{{.*}}(ptr noalias noundef nonnull align 4 dereferenceable(4) {{%.*}})
|
||||
// CHECK: define hidden void {{.*}}undef{{.*}}(ptr noalias noundef nonnull align 4 dereferenceable(4) {{%.*}})
|
||||
void undef(out int Z) { }
|
||||
|
||||
// ALL-LABEL: define noundef i32 {{.*}}case2
|
||||
@@ -54,7 +54,7 @@ export int case2() {
|
||||
// This test should verify that an out parameter value is written to as
|
||||
// expected.
|
||||
|
||||
// CHECK: define void {{.*}}zero{{.*}}(ptr noalias noundef nonnull align 4 dereferenceable(4) {{%.*}})
|
||||
// CHECK: define hidden void {{.*}}zero{{.*}}(ptr noalias noundef nonnull align 4 dereferenceable(4) {{%.*}})
|
||||
void zero(out int Z) { Z = 0; }
|
||||
|
||||
// ALL-LABEL: define noundef i32 {{.*}}case3
|
||||
@@ -76,7 +76,7 @@ export int case3() {
|
||||
// Vector swizzles in HLSL produce lvalues, so they can be used as arguments to
|
||||
// inout parameters and the swizzle is reversed on writeback.
|
||||
|
||||
// CHECK: define void {{.*}}funky{{.*}}(ptr noalias noundef nonnull align 16 dereferenceable(16) {{%.*}})
|
||||
// CHECK: define hidden void {{.*}}funky{{.*}}(ptr noalias noundef nonnull align 16 dereferenceable(16) {{%.*}})
|
||||
void funky(inout int3 X) {
|
||||
X.x += 1;
|
||||
X.y += 2;
|
||||
@@ -116,7 +116,7 @@ export int3 case4() {
|
||||
|
||||
// Case 5: Straightforward inout of a scalar value.
|
||||
|
||||
// CHECK: define void {{.*}}increment{{.*}}(ptr noalias noundef nonnull align 4 dereferenceable(4) {{%.*}})
|
||||
// CHECK: define hidden void {{.*}}increment{{.*}}(ptr noalias noundef nonnull align 4 dereferenceable(4) {{%.*}})
|
||||
void increment(inout int I) {
|
||||
I += 1;
|
||||
}
|
||||
@@ -144,7 +144,7 @@ struct S {
|
||||
float Y;
|
||||
};
|
||||
|
||||
// CHECK: define void {{.*}}init{{.*}}(ptr noalias noundef nonnull align 1 dereferenceable(8) {{%.*}})
|
||||
// CHECK: define hidden void {{.*}}init{{.*}}(ptr noalias noundef nonnull align 1 dereferenceable(8) {{%.*}})
|
||||
void init(out S s) {
|
||||
s.X = 3;
|
||||
s.Y = 4;
|
||||
@@ -170,7 +170,7 @@ struct R {
|
||||
float Y;
|
||||
};
|
||||
|
||||
// CHECK: define void {{.*}}init{{.*}}(ptr noalias noundef nonnull align 1 dereferenceable(8) {{%.*}})
|
||||
// CHECK: define hidden void {{.*}}init{{.*}}(ptr noalias noundef nonnull align 1 dereferenceable(8) {{%.*}})
|
||||
void init(inout R s) {
|
||||
s.X = 3;
|
||||
s.Y = 4;
|
||||
@@ -194,7 +194,7 @@ export int case7() {
|
||||
|
||||
// Case 8: Non-scalars with a cast expression.
|
||||
|
||||
// CHECK: define void {{.*}}trunc_vec{{.*}}(ptr noalias noundef nonnull align 16 dereferenceable(16) {{%.*}})
|
||||
// CHECK: define hidden void {{.*}}trunc_vec{{.*}}(ptr noalias noundef nonnull align 16 dereferenceable(16) {{%.*}})
|
||||
void trunc_vec(inout int3 V) {}
|
||||
|
||||
// ALL-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}case8
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
|
||||
|
||||
// CHECK-LABEL: define noundef i1 {{.*}}fn{{.*}}(i1 noundef %x)
|
||||
// CHECK-LABEL: define hidden noundef i1 {{.*}}fn{{.*}}(i1 noundef %x)
|
||||
// CHECK: [[X:%.*]] = alloca i32, align 4
|
||||
// CHECK-NEXT: [[Y:%.*]] = zext i1 {{%.*}} to i32
|
||||
// CHECK-NEXT: store i32 [[Y]], ptr [[X]], align 4
|
||||
|
||||
@@ -9,7 +9,7 @@ struct S {
|
||||
float f;
|
||||
};
|
||||
|
||||
// CHECK-LABEL: define noundef i1 {{.*}}fn1{{.*}}
|
||||
// CHECK-LABEL: define hidden noundef i1 {{.*}}fn1{{.*}}
|
||||
// CHECK: [[B:%.*]] = alloca <2 x i32>, align 8
|
||||
// CHECK-NEXT: store <2 x i32> splat (i32 1), ptr [[B]], align 8
|
||||
// CHECK-NEXT: [[BoolVec:%.*]] = load <2 x i32>, ptr [[B]], align 8
|
||||
@@ -21,7 +21,7 @@ bool fn1() {
|
||||
return B[0];
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef <2 x i1> {{.*}}fn2{{.*}}
|
||||
// CHECK-LABEL: define hidden noundef <2 x i1> {{.*}}fn2{{.*}}
|
||||
// CHECK: [[VAddr:%.*]] = alloca i32, align 4
|
||||
// CHECK-NEXT: [[A:%.*]] = alloca <2 x i32>, align 8
|
||||
// CHECK-NEXT: [[StoreV:%.*]] = zext i1 {{.*}} to i32
|
||||
@@ -40,7 +40,7 @@ bool2 fn2(bool V) {
|
||||
return A;
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef i1 {{.*}}fn3{{.*}}
|
||||
// CHECK-LABEL: define hidden noundef i1 {{.*}}fn3{{.*}}
|
||||
// CHECK: [[s:%.*]] = alloca %struct.S, align 1
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 1 [[s]], ptr align 1 [[ConstS]], i32 12, i1 false)
|
||||
// CHECK-NEXT: [[BV:%.*]] = getelementptr inbounds nuw %struct.S, ptr [[s]], i32 0, i32 0
|
||||
@@ -53,7 +53,7 @@ bool fn3() {
|
||||
return s.bv[0];
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef i1 {{.*}}fn4{{.*}}
|
||||
// CHECK-LABEL: define hidden noundef i1 {{.*}}fn4{{.*}}
|
||||
// CHECK: [[Arr:%.*]] = alloca [2 x <2 x i32>], align 8
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 8 [[Arr]], ptr align 8 [[ConstArr]], i32 16, i1 false)
|
||||
// CHECK-NEXT: [[Idx:%.*]] = getelementptr inbounds [2 x <2 x i32>], ptr [[Arr]], i32 0, i32 0
|
||||
@@ -66,7 +66,7 @@ bool fn4() {
|
||||
return Arr[0][1];
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}fn5{{.*}}
|
||||
// CHECK-LABEL: define hidden void {{.*}}fn5{{.*}}
|
||||
// CHECK: [[Arr:%.*]] = alloca <2 x i32>, align 8
|
||||
// CHECK-NEXT: store <2 x i32> splat (i32 1), ptr [[Arr]], align 8
|
||||
// CHECK-NEXT: [[L:%.*]] = load <2 x i32>, ptr [[Arr]], align 8
|
||||
@@ -78,7 +78,7 @@ void fn5() {
|
||||
Arr[1] = false;
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}fn6{{.*}}
|
||||
// CHECK-LABEL: define hidden void {{.*}}fn6{{.*}}
|
||||
// CHECK: [[V:%.*]] = alloca i32, align 4
|
||||
// CHECK-NEXT: [[S:%.*]] = alloca %struct.S, align 1
|
||||
// CHECK-NEXT: store i32 0, ptr [[V]], align 4
|
||||
@@ -97,7 +97,7 @@ void fn6() {
|
||||
s.bv[1] = V;
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}fn7{{.*}}
|
||||
// CHECK-LABEL: define hidden void {{.*}}fn7{{.*}}
|
||||
// CHECK: [[Arr:%.*]] = alloca [2 x <2 x i32>], align 8
|
||||
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 8 [[Arr]], ptr align 8 {{.*}}, i32 16, i1 false)
|
||||
// CHECK-NEXT: [[Idx:%.*]] = getelementptr inbounds [2 x <2 x i32>], ptr [[Arr]], i32 0, i32 0
|
||||
|
||||
@@ -33,7 +33,7 @@ void SecondEntry() {}
|
||||
|
||||
// Verify the constructor is alwaysinline
|
||||
// NOINLINE: ; Function Attrs: {{.*}}alwaysinline
|
||||
// NOINLINE-NEXT: define linkonce_odr void @_ZN4hlsl8RWBufferIfEC2EjijjPKc({{.*}} [[CtorAttr:\#[0-9]+]]
|
||||
// NOINLINE-NEXT: define linkonce_odr hidden void @_ZN4hlsl8RWBufferIfEC2EjijjPKc({{.*}} [[CtorAttr:\#[0-9]+]]
|
||||
|
||||
// NOINLINE: ; Function Attrs: {{.*}}alwaysinline
|
||||
// NOINLINE-NEXT: define internal void @_GLOBAL__sub_I_GlobalConstructorLib.hlsl() [[InitAttr:\#[0-9]+]]
|
||||
|
||||
@@ -6,38 +6,38 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - -DNAMESPACED| FileCheck %s
|
||||
|
||||
|
||||
// CHECK: @uint16_t_Val = external addrspace(2) global i16, align 2
|
||||
// CHECK: @int16_t_Val = external addrspace(2) global i16, align 2
|
||||
// CHECK: @uint_Val = external addrspace(2) global i32, align 4
|
||||
// CHECK: @uint64_t_Val = external addrspace(2) global i64, align 8
|
||||
// CHECK: @int64_t_Val = external addrspace(2) global i64, align 8
|
||||
// CHECK: @int16_t2_Val = external addrspace(2) global <2 x i16>, align 4
|
||||
// CHECK: @int16_t3_Val = external addrspace(2) global <3 x i16>, align 8
|
||||
// CHECK: @int16_t4_Val = external addrspace(2) global <4 x i16>, align 8
|
||||
// CHECK: @uint16_t2_Val = external addrspace(2) global <2 x i16>, align 4
|
||||
// CHECK: @uint16_t3_Val = external addrspace(2) global <3 x i16>, align 8
|
||||
// CHECK: @uint16_t4_Val = external addrspace(2) global <4 x i16>, align 8
|
||||
// CHECK: @int2_Val = external addrspace(2) global <2 x i32>, align 8
|
||||
// CHECK: @int3_Val = external addrspace(2) global <3 x i32>, align 16
|
||||
// CHECK: @int4_Val = external addrspace(2) global <4 x i32>, align 16
|
||||
// CHECK: @uint2_Val = external addrspace(2) global <2 x i32>, align 8
|
||||
// CHECK: @uint3_Val = external addrspace(2) global <3 x i32>, align 16
|
||||
// CHECK: @uint4_Val = external addrspace(2) global <4 x i32>, align 16
|
||||
// CHECK: @int64_t2_Val = external addrspace(2) global <2 x i64>, align 16
|
||||
// CHECK: @int64_t3_Val = external addrspace(2) global <3 x i64>, align 32
|
||||
// CHECK: @int64_t4_Val = external addrspace(2) global <4 x i64>, align 32
|
||||
// CHECK: @uint64_t2_Val = external addrspace(2) global <2 x i64>, align 16
|
||||
// CHECK: @uint64_t3_Val = external addrspace(2) global <3 x i64>, align 32
|
||||
// CHECK: @uint64_t4_Val = external addrspace(2) global <4 x i64>, align 32
|
||||
// CHECK: @half2_Val = external addrspace(2) global <2 x half>, align 4
|
||||
// CHECK: @half3_Val = external addrspace(2) global <3 x half>, align 8
|
||||
// CHECK: @half4_Val = external addrspace(2) global <4 x half>, align 8
|
||||
// CHECK: @float2_Val = external addrspace(2) global <2 x float>, align 8
|
||||
// CHECK: @float3_Val = external addrspace(2) global <3 x float>, align 16
|
||||
// CHECK: @float4_Val = external addrspace(2) global <4 x float>, align 16
|
||||
// CHECK: @double2_Val = external addrspace(2) global <2 x double>, align 16
|
||||
// CHECK: @double3_Val = external addrspace(2) global <3 x double>, align 32
|
||||
// CHECK: @double4_Val = external addrspace(2) global <4 x double>, align 32
|
||||
// CHECK: @uint16_t_Val = external hidden addrspace(2) global i16, align 2
|
||||
// CHECK: @int16_t_Val = external hidden addrspace(2) global i16, align 2
|
||||
// CHECK: @uint_Val = external hidden addrspace(2) global i32, align 4
|
||||
// CHECK: @uint64_t_Val = external hidden addrspace(2) global i64, align 8
|
||||
// CHECK: @int64_t_Val = external hidden addrspace(2) global i64, align 8
|
||||
// CHECK: @int16_t2_Val = external hidden addrspace(2) global <2 x i16>, align 4
|
||||
// CHECK: @int16_t3_Val = external hidden addrspace(2) global <3 x i16>, align 8
|
||||
// CHECK: @int16_t4_Val = external hidden addrspace(2) global <4 x i16>, align 8
|
||||
// CHECK: @uint16_t2_Val = external hidden addrspace(2) global <2 x i16>, align 4
|
||||
// CHECK: @uint16_t3_Val = external hidden addrspace(2) global <3 x i16>, align 8
|
||||
// CHECK: @uint16_t4_Val = external hidden addrspace(2) global <4 x i16>, align 8
|
||||
// CHECK: @int2_Val = external hidden addrspace(2) global <2 x i32>, align 8
|
||||
// CHECK: @int3_Val = external hidden addrspace(2) global <3 x i32>, align 16
|
||||
// CHECK: @int4_Val = external hidden addrspace(2) global <4 x i32>, align 16
|
||||
// CHECK: @uint2_Val = external hidden addrspace(2) global <2 x i32>, align 8
|
||||
// CHECK: @uint3_Val = external hidden addrspace(2) global <3 x i32>, align 16
|
||||
// CHECK: @uint4_Val = external hidden addrspace(2) global <4 x i32>, align 16
|
||||
// CHECK: @int64_t2_Val = external hidden addrspace(2) global <2 x i64>, align 16
|
||||
// CHECK: @int64_t3_Val = external hidden addrspace(2) global <3 x i64>, align 32
|
||||
// CHECK: @int64_t4_Val = external hidden addrspace(2) global <4 x i64>, align 32
|
||||
// CHECK: @uint64_t2_Val = external hidden addrspace(2) global <2 x i64>, align 16
|
||||
// CHECK: @uint64_t3_Val = external hidden addrspace(2) global <3 x i64>, align 32
|
||||
// CHECK: @uint64_t4_Val = external hidden addrspace(2) global <4 x i64>, align 32
|
||||
// CHECK: @half2_Val = external hidden addrspace(2) global <2 x half>, align 4
|
||||
// CHECK: @half3_Val = external hidden addrspace(2) global <3 x half>, align 8
|
||||
// CHECK: @half4_Val = external hidden addrspace(2) global <4 x half>, align 8
|
||||
// CHECK: @float2_Val = external hidden addrspace(2) global <2 x float>, align 8
|
||||
// CHECK: @float3_Val = external hidden addrspace(2) global <3 x float>, align 16
|
||||
// CHECK: @float4_Val = external hidden addrspace(2) global <4 x float>, align 16
|
||||
// CHECK: @double2_Val = external hidden addrspace(2) global <2 x double>, align 16
|
||||
// CHECK: @double3_Val = external hidden addrspace(2) global <3 x double>, align 32
|
||||
// CHECK: @double4_Val = external hidden addrspace(2) global <4 x double>, align 32
|
||||
|
||||
#ifdef NAMESPACED
|
||||
#define TYPE_DECL(T) hlsl::T T##_Val
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK
|
||||
|
||||
|
||||
// CHECK-LABEL: define noundef <2 x i32> @_Z20test_AddUint64_uint2Dv2_jS_(
|
||||
// CHECK-LABEL: define hidden noundef <2 x i32> @_Z20test_AddUint64_uint2Dv2_jS_(
|
||||
// CHECK-SAME: <2 x i32> noundef [[A:%.*]], <2 x i32> noundef [[B:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[A_ADDR:%.*]] = alloca <2 x i32>, align 8
|
||||
@@ -31,7 +31,7 @@ uint2 test_AddUint64_uint2(uint2 a, uint2 b) {
|
||||
return AddUint64(a, b);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef <4 x i32> @_Z20test_AddUint64_uint4Dv4_jS_(
|
||||
// CHECK-LABEL: define hidden noundef <4 x i32> @_Z20test_AddUint64_uint4Dv4_jS_(
|
||||
// CHECK-SAME: <4 x i32> noundef [[A:%.*]], <4 x i32> noundef [[B:%.*]]) #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[A_ADDR:%.*]] = alloca <4 x i32>, align 16
|
||||
|
||||
@@ -35,7 +35,7 @@ export void foo() {
|
||||
// CHECK-SAME: i32 noundef 1, i32 noundef 2, i32 noundef 1, i32 noundef 0, ptr noundef @[[Buf1Str]])
|
||||
|
||||
// Buf1 initialization part 2 - body of ByteAddressBuffer C1 constructor with explicit binding that calls the C2 constructor
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl17ByteAddressBufferC1EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl17ByteAddressBufferC1EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK-SAME: i32 noundef %registerNo, i32 noundef %spaceNo, i32 noundef %range, i32 noundef %index, ptr noundef %name)
|
||||
// CHECK: call void @_ZN4hlsl17ByteAddressBufferC2EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4)
|
||||
// CHECK-SAME: %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, ptr noundef %{{.*}})
|
||||
@@ -47,27 +47,27 @@ export void foo() {
|
||||
// CHECK-SAME: i32 noundef 0, i32 noundef 1, i32 noundef 0, i32 noundef 0, ptr noundef @[[Buf2Str]])
|
||||
|
||||
// Buf2 initialization part 2 - body of RWByteAddressBuffer C1 constructor with implicit binding that calls the C2 constructor
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl19RWByteAddressBufferC1EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl19RWByteAddressBufferC1EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK-SAME: i32 noundef %spaceNo, i32 noundef %range, i32 noundef %index, i32 noundef %orderId, ptr noundef %name)
|
||||
// CHECK: call void @_ZN4hlsl19RWByteAddressBufferC2EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4) %this1,
|
||||
// CHECK-SAME: i32 noundef %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, ptr noundef %{{.*}})
|
||||
|
||||
// Buf3 initialization part 1 - local variable declared in function foo() is initialized by
|
||||
// RasterizerOrderedByteAddressBuffer C1 default constructor
|
||||
// CHECK: define void @_Z3foov() #2 {
|
||||
// CHECK: define void @_Z3foov()
|
||||
// CHECK-NEXT: entry:
|
||||
// CHECK-NEXT: %Buf3 = alloca %"class.hlsl::RasterizerOrderedByteAddressBuffer", align 4
|
||||
// CHECK-NEXT: call void @_ZN4hlsl34RasterizerOrderedByteAddressBufferC1Ev(ptr noundef nonnull align 4 dereferenceable(4) %Buf3)
|
||||
|
||||
// Buf3 initialization part 2 - body of RasterizerOrderedByteAddressBuffer default C1 constructor that
|
||||
// calls the default C2 constructor
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl34RasterizerOrderedByteAddressBufferC1Ev(ptr noundef nonnull align 4 dereferenceable(4) %this)
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl34RasterizerOrderedByteAddressBufferC1Ev(ptr noundef nonnull align 4 dereferenceable(4) %this)
|
||||
// CHECK: call void @_ZN4hlsl34RasterizerOrderedByteAddressBufferC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %{{.*}})
|
||||
// CHECK-NEXT: ret void
|
||||
|
||||
// Buf1 initialization part 3 - ByteAddressBuffer C2 constructor with explicit binding that initializes
|
||||
// handle with @llvm.dx.resource.handlefrombinding
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl17ByteAddressBufferC2EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl17ByteAddressBufferC2EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK-SAME: i32 noundef %registerNo, i32 noundef %spaceNo, i32 noundef %range, i32 noundef %index, ptr noundef %name)
|
||||
// CHECK-DXIL: %[[HANDLE:.*]] = call target("dx.RawBuffer", i8, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.RawBuffer_i8_0_0t(
|
||||
// CHECK-DXIL-SAME: i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i1 false, ptr %{{.*}})
|
||||
@@ -76,7 +76,7 @@ export void foo() {
|
||||
|
||||
// Buf2 initialization part 3 - body of RWByteAddressBuffer C2 constructor with implicit binding that initializes
|
||||
// handle with @llvm.dx.resource.handlefromimplicitbinding
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl19RWByteAddressBufferC2EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl19RWByteAddressBufferC2EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK-SAME: i32 noundef %spaceNo, i32 noundef %range, i32 noundef %index, i32 noundef %orderId, ptr noundef %name)
|
||||
// CHECK: %[[HANDLE:.*]] = call target("dx.RawBuffer", i8, 1, 0) @llvm.dx.resource.handlefromimplicitbinding.tdx.RawBuffer_i8_1_0t
|
||||
// CHECK-SAME: (i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i1 false, ptr %{{.*}})
|
||||
@@ -85,7 +85,7 @@ export void foo() {
|
||||
|
||||
// Buf3 initialization part 3 - body of RasterizerOrderedByteAddressBuffer default C2 constructor that
|
||||
// initializes handle to poison
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl34RasterizerOrderedByteAddressBufferC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %this)
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl34RasterizerOrderedByteAddressBufferC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %this)
|
||||
// CHECK: %__handle = getelementptr inbounds nuw %"class.hlsl::RasterizerOrderedByteAddressBuffer", ptr %{{.*}}, i32 0, i32 0
|
||||
// CHECK: store target("dx.RawBuffer", i8, 1, 1) poison, ptr %__handle, align 4
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: -DTARGET=dx -DFNATTRS=noundef -check-prefixes=CHECK,CHECK-DXIL
|
||||
// RUN: -DTARGET=dx -check-prefixes=CHECK,CHECK-DXIL
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: -DTARGET=spv -DFNATTRS="spir_func noundef" -check-prefixes=CHECK,CHECK-SPIRV
|
||||
// RUN: -DTARGET=spv -check-prefixes=CHECK,CHECK-SPIRV
|
||||
|
||||
// CHECK-DXIL: define void @
|
||||
// CHECK-SPIRV: define spir_func void @
|
||||
// CHECK-DXIL: define hidden void @
|
||||
// CHECK-SPIRV: define hidden spir_func void @
|
||||
void test_GroupMemoryBarrierWithGroupSync() {
|
||||
// CHECK-DXIL: call void @llvm.[[TARGET]].group.memory.barrier.with.group.sync()
|
||||
// CHECK-SPIRV: call spir_func void @llvm.[[TARGET]].group.memory.barrier.with.group.sync()
|
||||
|
||||
@@ -35,7 +35,7 @@ export void foo() {
|
||||
// CHECK-SAME: i32 noundef 5, i32 noundef 3, i32 noundef 1, i32 noundef 0, ptr noundef @[[Buf1Str]])
|
||||
|
||||
// Buf1 initialization part 2 - body of RWBuffer<float> C1 constructor with explicit binding that calls the C2 constructor
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl8RWBufferIfEC1EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl8RWBufferIfEC1EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK-SAME: i32 noundef %registerNo, i32 noundef %spaceNo, i32 noundef %range, i32 noundef %index, ptr noundef %name)
|
||||
// CHECK: call void @_ZN4hlsl8RWBufferIfEC2EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4)
|
||||
// CHECK-SAME: %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, ptr noundef %{{.*}})
|
||||
@@ -47,7 +47,7 @@ export void foo() {
|
||||
// CHECK-SAME: i32 noundef 0, i32 noundef 1, i32 noundef 0, i32 noundef 0, ptr noundef @[[Buf2Str]])
|
||||
|
||||
// Buf2 initialization part 2 - body of RWBuffer<float> C1 constructor with implicit binding that calls the C2 constructor
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl8RWBufferIdEC1EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl8RWBufferIdEC1EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK-SAME: i32 noundef %spaceNo, i32 noundef %range, i32 noundef %index, i32 noundef %orderId, ptr noundef %name)
|
||||
// CHECK: call void @_ZN4hlsl8RWBufferIdEC2EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4)
|
||||
// CHECK-SAME: %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, ptr noundef %{{.*}})
|
||||
@@ -59,12 +59,12 @@ export void foo() {
|
||||
// CHECK-NEXT: call void @_ZN4hlsl8RWBufferIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) %Buf3)
|
||||
|
||||
// Buf3 initialization part 2 - body of RWBuffer<int> default C1 constructor that calls the default C2 constructor
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl8RWBufferIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) %this)
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl8RWBufferIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) %this)
|
||||
// CHECK: call void @_ZN4hlsl8RWBufferIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %{{.*}})
|
||||
|
||||
// Buf1 initialization part 3 - body of RWBuffer<float> C2 constructor with explicit binding that initializes
|
||||
// handle with @llvm.dx.resource.handlefrombinding
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl8RWBufferIfEC2EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl8RWBufferIfEC2EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK-SAME: i32 noundef %registerNo, i32 noundef %spaceNo, i32 noundef %range, i32 noundef %index, ptr noundef %name)
|
||||
// CHECK-DXIL: %[[HANDLE:.*]] = call target("dx.TypedBuffer", float, 1, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_f32_1_0_0t(
|
||||
// CHECK-DXIL-SAME: i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i1 false, ptr %{{.*}})
|
||||
@@ -73,7 +73,7 @@ export void foo() {
|
||||
|
||||
// Buf2 initialization part 3 - body of RWBuffer<float> C2 constructor with implicit binding that initializes
|
||||
// handle with @llvm.dx.resource.handlefromimplicitbinding
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl8RWBufferIdEC2EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl8RWBufferIdEC2EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK-SAME: i32 noundef %spaceNo, i32 noundef %range, i32 noundef %index, i32 noundef %orderId, ptr noundef %name)
|
||||
// CHECK: %[[HANDLE:.*]] = call target("dx.TypedBuffer", double, 1, 0, 0) @llvm.dx.resource.handlefromimplicitbinding.tdx.TypedBuffer_f64_1_0_0t
|
||||
// CHECK-SAME: (i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i1 false, ptr %{{.*}})
|
||||
@@ -81,7 +81,7 @@ export void foo() {
|
||||
// CHECK-NEXT: store target("dx.TypedBuffer", double, 1, 0, 0) %[[HANDLE]], ptr %__handle, align 4
|
||||
|
||||
// Buf3 initialization part 3 - body of RWBuffer<int> default C2 constructor that initializes handle to poison
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl8RWBufferIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %this)
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl8RWBufferIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %this)
|
||||
// CHECK: %__handle = getelementptr inbounds nuw %"class.hlsl::RWBuffer.1", ptr %{{.*}}, i32 0, i32 0
|
||||
// CHECK-NEXT: store target("dx.TypedBuffer", i32, 1, 0, 1) poison, ptr %__handle, align 4
|
||||
|
||||
|
||||
@@ -304,7 +304,7 @@ bool2 AccessBools() {
|
||||
return X.zw;
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define void {{.*}}BoolSizeMismatch{{.*}}
|
||||
// CHECK-LABEL: define hidden void {{.*}}BoolSizeMismatch{{.*}}
|
||||
// CHECK: [[B:%.*]] = alloca <4 x i32>, align 16
|
||||
// CHECK-NEXT: [[Tmp:%.*]] = alloca <1 x i32>, align 4
|
||||
// CHECK-NEXT: store <4 x i32> splat (i32 1), ptr [[B]], align 16
|
||||
|
||||
@@ -36,7 +36,7 @@ export void foo() {
|
||||
|
||||
// Buf1 initialization part 2 - body of StructuredBuffer<float> C1 constructor with explicit binding
|
||||
// that calls the C2 constructor
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl16StructuredBufferIfEC1EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl16StructuredBufferIfEC1EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK-SAME: i32 noundef %registerNo, i32 noundef %spaceNo, i32 noundef %range, i32 noundef %index, ptr noundef %name)
|
||||
// CHECK: call void @_ZN4hlsl16StructuredBufferIfEC2EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4)
|
||||
// CHECK-SAME: %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, ptr noundef %{{.*}})
|
||||
@@ -49,7 +49,7 @@ export void foo() {
|
||||
// CHECK-SAME: i32 noundef 0, i32 noundef 1, i32 noundef 0, i32 noundef 0, ptr noundef @[[Buf2Str]])
|
||||
|
||||
// Buf2 initialization part 2 - body of RWStructuredBuffer<float> C1 constructor with implicit binding that calls the C2 constructor
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl18RWStructuredBufferIfEC1EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl18RWStructuredBufferIfEC1EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK-SAME: i32 noundef %spaceNo, i32 noundef %range, i32 noundef %index, i32 noundef %orderId, ptr noundef %name)
|
||||
// CHECK: call void @_ZN4hlsl18RWStructuredBufferIfEC2EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4)
|
||||
// CHECK-SAME: %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, i32 noundef %{{.*}}, ptr noundef %{{.*}})
|
||||
@@ -63,12 +63,12 @@ export void foo() {
|
||||
|
||||
// Buf3 initialization part 2 - body of AppendStructuredBuffer<float> default C1 constructor that calls
|
||||
// the default C2 constructor
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl22AppendStructuredBufferIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) %this)
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl22AppendStructuredBufferIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) %this)
|
||||
// CHECK: call void @_ZN4hlsl22AppendStructuredBufferIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %{{.*}})
|
||||
|
||||
// Buf1 initialization part 3 - body of AppendStructuredBuffer<float> C2 constructor with explicit binding
|
||||
// that initializes handle with @llvm.dx.resource.handlefrombinding
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl16StructuredBufferIfEC2EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl16StructuredBufferIfEC2EjjijPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK-SAME: i32 noundef %registerNo, i32 noundef %spaceNo, i32 noundef %range, i32 noundef %index, ptr noundef %name)
|
||||
// CHECK-DXIL: %[[HANDLE:.*]] = call target("dx.RawBuffer", float, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.RawBuffer_f32_0_0t(
|
||||
// CHECK-SAME: i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i1 false, ptr %{{.*}})
|
||||
@@ -77,7 +77,7 @@ export void foo() {
|
||||
|
||||
// Buf2 initialization part 3 - body of RWStructuredBuffer<float> C2 constructor with implicit binding that initializes
|
||||
// handle with @llvm.dx.resource.handlefromimplicitbinding
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl18RWStructuredBufferIfEC2EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl18RWStructuredBufferIfEC2EjijjPKc(ptr noundef nonnull align 4 dereferenceable(4) %this,
|
||||
// CHECK-SAME: i32 noundef %spaceNo, i32 noundef %range, i32 noundef %index, i32 noundef %orderId, ptr noundef %name)
|
||||
// CHECK: %[[HANDLE:.*]] = call target("dx.RawBuffer", float, 1, 0) @llvm.dx.resource.handlefromimplicitbinding.tdx.RawBuffer_f32_1_0t
|
||||
// CHECK-SAME: (i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}}, i1 false, ptr %{{.*}})
|
||||
@@ -86,7 +86,7 @@ export void foo() {
|
||||
|
||||
// Buf3 initialization part 3 - body of AppendStructuredBuffer<float> default C2 constructor that
|
||||
// initializes handle to poison
|
||||
// CHECK: define linkonce_odr void @_ZN4hlsl22AppendStructuredBufferIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %this)
|
||||
// CHECK: define linkonce_odr hidden void @_ZN4hlsl22AppendStructuredBufferIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %this)
|
||||
// CHECK: %__handle = getelementptr inbounds nuw %"class.hlsl::AppendStructuredBuffer", ptr %{{.*}}, i32 0, i32 0
|
||||
// CHECK: store target("dx.RawBuffer", float, 1, 0) poison, ptr %__handle, align 4
|
||||
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
using hlsl::abs;
|
||||
|
||||
#ifdef __HLSL_ENABLE_16_BIT
|
||||
// NATIVE_HALF-LABEL: define noundef i16 @_Z16test_abs_int16_t
|
||||
// NATIVE_HALF-LABEL: define hidden noundef i16 @_Z16test_abs_int16_t
|
||||
// NATIVE_HALF: call i16 @llvm.abs.i16(
|
||||
int16_t test_abs_int16_t(int16_t p0) { return abs(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef <2 x i16> @_Z17test_abs_int16_t2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <2 x i16> @_Z17test_abs_int16_t2
|
||||
// NATIVE_HALF: call <2 x i16> @llvm.abs.v2i16(
|
||||
int16_t2 test_abs_int16_t2(int16_t2 p0) { return abs(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef <3 x i16> @_Z17test_abs_int16_t3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <3 x i16> @_Z17test_abs_int16_t3
|
||||
// NATIVE_HALF: call <3 x i16> @llvm.abs.v3i16(
|
||||
int16_t3 test_abs_int16_t3(int16_t3 p0) { return abs(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef <4 x i16> @_Z17test_abs_int16_t4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <4 x i16> @_Z17test_abs_int16_t4
|
||||
// NATIVE_HALF: call <4 x i16> @llvm.abs.v4i16(
|
||||
int16_t4 test_abs_int16_t4(int16_t4 p0) { return abs(p0); }
|
||||
|
||||
@@ -50,76 +50,76 @@ uint16_t3 test_abs_uint64_t3(uint16_t3 p0) { return abs(p0); }
|
||||
uint16_t4 test_abs_uint64_t4(uint16_t4 p0) { return abs(p0); }
|
||||
#endif // __HLSL_ENABLE_16_BIT
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z13test_abs_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z13test_abs_half
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.fabs.f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z13test_abs_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z13test_abs_half
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.fabs.f32(float %0)
|
||||
half test_abs_half(half p0) { return abs(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z14test_abs_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z14test_abs_half2
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.fabs.v2f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z14test_abs_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z14test_abs_half2
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.fabs.v2f32(
|
||||
half2 test_abs_half2(half2 p0) { return abs(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z14test_abs_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z14test_abs_half3
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.fabs.v3f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z14test_abs_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z14test_abs_half3
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.fabs.v3f32(
|
||||
half3 test_abs_half3(half3 p0) { return abs(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z14test_abs_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z14test_abs_half4
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.fabs.v4f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z14test_abs_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z14test_abs_half4
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.fabs.v4f32(
|
||||
half4 test_abs_half4(half4 p0) { return abs(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef i32 @_Z12test_abs_int
|
||||
// CHECK-LABEL: define hidden noundef i32 @_Z12test_abs_int
|
||||
// CHECK: call i32 @llvm.abs.i32(
|
||||
int test_abs_int(int p0) { return abs(p0); }
|
||||
// CHECK-LABEL: define noundef <2 x i32> @_Z13test_abs_int2
|
||||
// CHECK-LABEL: define hidden noundef <2 x i32> @_Z13test_abs_int2
|
||||
// CHECK: call <2 x i32> @llvm.abs.v2i32(
|
||||
int2 test_abs_int2(int2 p0) { return abs(p0); }
|
||||
// CHECK-LABEL: define noundef <3 x i32> @_Z13test_abs_int3
|
||||
// CHECK-LABEL: define hidden noundef <3 x i32> @_Z13test_abs_int3
|
||||
// CHECK: call <3 x i32> @llvm.abs.v3i32(
|
||||
int3 test_abs_int3(int3 p0) { return abs(p0); }
|
||||
// CHECK-LABEL: define noundef <4 x i32> @_Z13test_abs_int4
|
||||
// CHECK-LABEL: define hidden noundef <4 x i32> @_Z13test_abs_int4
|
||||
// CHECK: call <4 x i32> @llvm.abs.v4i32(
|
||||
int4 test_abs_int4(int4 p0) { return abs(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z14test_abs_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_abs_float
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.fabs.f32(
|
||||
float test_abs_float(float p0) { return abs(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z15test_abs_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_abs_float2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.fabs.v2f32(
|
||||
float2 test_abs_float2(float2 p0) { return abs(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z15test_abs_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_abs_float3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.fabs.v3f32(
|
||||
float3 test_abs_float3(float3 p0) { return abs(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z15test_abs_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_abs_float4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.fabs.v4f32(
|
||||
float4 test_abs_float4(float4 p0) { return abs(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef i64 @_Z16test_abs_int64_t
|
||||
// CHECK-LABEL: define hidden noundef i64 @_Z16test_abs_int64_t
|
||||
// CHECK: call i64 @llvm.abs.i64(
|
||||
int64_t test_abs_int64_t(int64_t p0) { return abs(p0); }
|
||||
// CHECK-LABEL: define noundef <2 x i64> @_Z17test_abs_int64_t2
|
||||
// CHECK-LABEL: define hidden noundef <2 x i64> @_Z17test_abs_int64_t2
|
||||
// CHECK: call <2 x i64> @llvm.abs.v2i64(
|
||||
int64_t2 test_abs_int64_t2(int64_t2 p0) { return abs(p0); }
|
||||
// CHECK-LABEL: define noundef <3 x i64> @_Z17test_abs_int64_t3
|
||||
// CHECK-LABEL: define hidden noundef <3 x i64> @_Z17test_abs_int64_t3
|
||||
// CHECK: call <3 x i64> @llvm.abs.v3i64(
|
||||
int64_t3 test_abs_int64_t3(int64_t3 p0) { return abs(p0); }
|
||||
// CHECK-LABEL: define noundef <4 x i64> @_Z17test_abs_int64_t4
|
||||
// CHECK-LABEL: define hidden noundef <4 x i64> @_Z17test_abs_int64_t4
|
||||
// CHECK: call <4 x i64> @llvm.abs.v4i64(
|
||||
int64_t4 test_abs_int64_t4(int64_t4 p0) { return abs(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) double @_Z15test_abs_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) double @_Z15test_abs_double
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn double @llvm.fabs.f64(
|
||||
double test_abs_double(double p0) { return abs(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x double> @_Z16test_abs_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x double> @_Z16test_abs_double2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x double> @llvm.fabs.v2f64(
|
||||
double2 test_abs_double2(double2 p0) { return abs(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x double> @_Z16test_abs_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x double> @_Z16test_abs_double3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x double> @llvm.fabs.v3f64(
|
||||
double3 test_abs_double3(double3 p0) { return abs(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x double> @_Z16test_abs_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x double> @_Z16test_abs_double4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x double> @llvm.fabs.v4f64(
|
||||
double4 test_abs_double4(double4 p0) { return abs(p0); }
|
||||
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS="spir_func noundef" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef" -DTARGET=spv
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFNATTRS="spir_func noundef" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef" -DTARGET=spv
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS=noundef -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFNATTRS=noundef -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef" -DTARGET=dx
|
||||
|
||||
#ifdef __HLSL_ENABLE_16_BIT
|
||||
// NATIVE_HALF: define [[FNATTRS]] i1 @
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s \
|
||||
// RUN: -emit-llvm -O1 -o - | FileCheck %s
|
||||
|
||||
// CHECK-LABEL: define noundef i1 @_Z15test_and_scalarbb(
|
||||
// CHECK-LABEL: define hidden noundef i1 @_Z15test_and_scalarbb(
|
||||
// CHECK-SAME: i1 noundef [[X:%.*]], i1 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_AND:%.*]] = and i1 [[X]], [[Y]]
|
||||
@@ -13,7 +13,7 @@ bool test_and_scalar(bool x, bool y) {
|
||||
return and(x, y);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef <2 x i1> @_Z14test_and_bool2Dv2_bS_(
|
||||
// CHECK-LABEL: define hidden noundef <2 x i1> @_Z14test_and_bool2Dv2_bS_(
|
||||
// CHECK-SAME: <2 x i1> noundef [[X:%.*]], <2 x i1> noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_AND:%.*]] = and <2 x i1> [[X]], [[Y]]
|
||||
@@ -23,7 +23,7 @@ bool2 test_and_bool2(bool2 x, bool2 y) {
|
||||
return and(x, y);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef <3 x i1> @_Z14test_and_bool3Dv3_bS_(
|
||||
// CHECK-LABEL: define hidden noundef <3 x i1> @_Z14test_and_bool3Dv3_bS_(
|
||||
// CHECK-SAME: <3 x i1> noundef [[X:%.*]], <3 x i1> noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_AND:%.*]] = and <3 x i1> [[X]], [[Y]]
|
||||
@@ -33,7 +33,7 @@ bool3 test_and_bool3(bool3 x, bool3 y) {
|
||||
return and(x, y);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef <4 x i1> @_Z14test_and_bool4Dv4_bS_(
|
||||
// CHECK-LABEL: define hidden noundef <4 x i1> @_Z14test_and_bool4Dv4_bS_(
|
||||
// CHECK-SAME: <4 x i1> noundef [[X:%.*]], <4 x i1> noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_AND:%.*]] = and <4 x i1> [[X]], [[Y]]
|
||||
@@ -43,7 +43,7 @@ bool4 test_and_bool4(bool4 x, bool4 y) {
|
||||
return and(x, y);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef <4 x i1> @_Z13test_and_int4Dv4_iS_(
|
||||
// CHECK-LABEL: define hidden noundef <4 x i1> @_Z13test_and_int4Dv4_iS_(
|
||||
// CHECK-SAME: <4 x i32> noundef [[X:%.*]], <4 x i32> noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[TOBOOL:%.*]] = icmp ne <4 x i32> [[X]], zeroinitializer
|
||||
@@ -55,7 +55,7 @@ bool4 test_and_int4(int4 x, int4 y) {
|
||||
return and(x, y);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef <4 x i1> @_Z15test_and_float4Dv4_fS_(
|
||||
// CHECK-LABEL: define hidden noundef <4 x i1> @_Z15test_and_float4Dv4_fS_(
|
||||
// CHECK-SAME: <4 x float> noundef nofpclass(nan inf) [[X:%.*]], <4 x float> noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[TOBOOL:%.*]] = fcmp reassoc nnan ninf nsz arcp afn une <4 x float> [[X]], zeroinitializer
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS="spir_func noundef" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef" -DTARGET=spv
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFNATTRS="spir_func noundef" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef" -DTARGET=spv
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS=noundef -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFNATTRS=noundef -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef" -DTARGET=dx
|
||||
|
||||
#ifdef __HLSL_ENABLE_16_BIT
|
||||
// NATIVE_HALF: define [[FNATTRS]] i1 @
|
||||
|
||||
@@ -4,67 +4,67 @@
|
||||
|
||||
using hlsl::ceil;
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_ceil_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_ceil_double
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.ceil.f32(
|
||||
float test_ceil_double(double p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_ceil_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_ceil_double2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.ceil.v2f32(
|
||||
float2 test_ceil_double2(double2 p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_ceil_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_ceil_double3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.ceil.v3f32(
|
||||
float3 test_ceil_double3(double3 p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_ceil_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_ceil_double4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.ceil.v4f32(
|
||||
float4 test_ceil_double4(double4 p0) { return ceil(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_ceil_int
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_ceil_int
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.ceil.f32(
|
||||
float test_ceil_int(int p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_ceil_int2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_ceil_int2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.ceil.v2f32(
|
||||
float2 test_ceil_int2(int2 p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_ceil_int3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_ceil_int3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.ceil.v3f32(
|
||||
float3 test_ceil_int3(int3 p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_ceil_int4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_ceil_int4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.ceil.v4f32(
|
||||
float4 test_ceil_int4(int4 p0) { return ceil(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_ceil_uint
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_ceil_uint
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.ceil.f32(
|
||||
float test_ceil_uint(uint p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_ceil_uint2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_ceil_uint2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.ceil.v2f32(
|
||||
float2 test_ceil_uint2(uint2 p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_ceil_uint3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_ceil_uint3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.ceil.v3f32(
|
||||
float3 test_ceil_uint3(uint3 p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_ceil_uint4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_ceil_uint4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.ceil.v4f32(
|
||||
float4 test_ceil_uint4(uint4 p0) { return ceil(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_ceil_int64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_ceil_int64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.ceil.f32(
|
||||
float test_ceil_int64_t(int64_t p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_ceil_int64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_ceil_int64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.ceil.v2f32(
|
||||
float2 test_ceil_int64_t2(int64_t2 p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_ceil_int64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_ceil_int64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.ceil.v3f32(
|
||||
float3 test_ceil_int64_t3(int64_t3 p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_ceil_int64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_ceil_int64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.ceil.v4f32(
|
||||
float4 test_ceil_int64_t4(int64_t4 p0) { return ceil(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_ceil_uint64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_ceil_uint64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.ceil.f32(
|
||||
float test_ceil_uint64_t(uint64_t p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_ceil_uint64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_ceil_uint64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.ceil.v2f32(
|
||||
float2 test_ceil_uint64_t2(uint64_t2 p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_ceil_uint64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_ceil_uint64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.ceil.v3f32(
|
||||
float3 test_ceil_uint64_t3(uint64_t3 p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_ceil_uint64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_ceil_uint64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.ceil.v4f32(
|
||||
float4 test_ceil_uint64_t4(uint64_t4 p0) { return ceil(p0); }
|
||||
|
||||
@@ -7,36 +7,36 @@
|
||||
|
||||
using hlsl::ceil;
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z14test_ceil_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z14test_ceil_half
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.ceil.f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z14test_ceil_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_ceil_half
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.ceil.f32(float %0)
|
||||
half test_ceil_half(half p0) { return ceil(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z15test_ceil_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z15test_ceil_half2
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.ceil.v2f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z15test_ceil_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_ceil_half2
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.ceil.v2f32(
|
||||
half2 test_ceil_half2(half2 p0) { return ceil(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z15test_ceil_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z15test_ceil_half3
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.ceil.v3f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z15test_ceil_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_ceil_half3
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.ceil.v3f32(
|
||||
half3 test_ceil_half3(half3 p0) { return ceil(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z15test_ceil_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z15test_ceil_half4
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.ceil.v4f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z15test_ceil_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_ceil_half4
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.ceil.v4f32(
|
||||
half4 test_ceil_half4(half4 p0) { return ceil(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z15test_ceil_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z15test_ceil_float
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.ceil.f32(
|
||||
float test_ceil_float(float p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z16test_ceil_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z16test_ceil_float2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.ceil.v2f32(
|
||||
float2 test_ceil_float2(float2 p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z16test_ceil_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z16test_ceil_float3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.ceil.v3f32(
|
||||
float3 test_ceil_float3(float3 p0) { return ceil(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z16test_ceil_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z16test_ceil_float4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.ceil.v4f32(
|
||||
float4 test_ceil_float4(float4 p0) { return ceil(p0); }
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple dxil-pc-shadermodel6.3-library %s \
|
||||
// RUN: -fnative-half-type -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DTARGET=dx -DFNATTRS=noundef -DFFNATTRS="nofpclass(nan inf)"
|
||||
// RUN: -DTARGET=dx -DFNATTRS="hidden noundef" -DFFNATTRS="nofpclass(nan inf)"
|
||||
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple dxil-pc-shadermodel6.3-library %s \
|
||||
// RUN: -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DTARGET=dx -DFNATTRS=noundef -DFFNATTRS="nofpclass(nan inf)"
|
||||
// RUN: -DTARGET=dx -DFNATTRS="hidden noundef" -DFFNATTRS="nofpclass(nan inf)"
|
||||
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple spirv-unknown-vulkan-compute %s \
|
||||
// RUN: -fnative-half-type -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DTARGET=spv -DFNATTRS="spir_func noundef" -DFFNATTRS="nofpclass(nan inf)"
|
||||
// RUN: -DTARGET=spv -DFNATTRS="hidden spir_func noundef" -DFFNATTRS="nofpclass(nan inf)"
|
||||
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple spirv-unknown-vulkan-compute %s \
|
||||
// RUN: -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DTARGET=spv -DFNATTRS="spir_func noundef" -DFFNATTRS="nofpclass(nan inf)"
|
||||
// RUN: -DTARGET=spv -DFNATTRS="hidden spir_func noundef" -DFFNATTRS="nofpclass(nan inf)"
|
||||
|
||||
#ifdef __HLSL_ENABLE_16_BIT
|
||||
// NATIVE_HALF: define [[FNATTRS]] <4 x i16> {{.*}}test_clamp_short4_mismatch
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library %s \
|
||||
// RUN: -fnative-half-type -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DTARGET=dx -DFNATTRS=noundef -DFFNATTRS="nofpclass(nan inf)"
|
||||
// RUN: -DTARGET=dx -DFNATTRS="hidden noundef" -DFFNATTRS="nofpclass(nan inf)"
|
||||
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library %s \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DTARGET=dx -DFNATTRS=noundef -DFFNATTRS="nofpclass(nan inf)"
|
||||
// RUN: -DTARGET=dx -DFNATTRS="hidden noundef" -DFFNATTRS="nofpclass(nan inf)"
|
||||
// RUN: %clang_cc1 -finclude-default-header -triple spirv-unknown-vulkan-compute %s \
|
||||
// RUN: -fnative-half-type -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DTARGET=spv -DFNATTRS="spir_func noundef" -DFFNATTRS="nofpclass(nan inf)"
|
||||
// RUN: -DTARGET=spv -DFNATTRS="hidden spir_func noundef" -DFFNATTRS="nofpclass(nan inf)"
|
||||
// RUN: %clang_cc1 -finclude-default-header -triple spirv-unknown-vulkan-compute %s \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DTARGET=spv -DFNATTRS="spir_func noundef" -DFFNATTRS="nofpclass(nan inf)"
|
||||
// RUN: -DTARGET=spv -DFNATTRS="hidden spir_func noundef" -DFFNATTRS="nofpclass(nan inf)"
|
||||
|
||||
#ifdef __HLSL_ENABLE_16_BIT
|
||||
// NATIVE_HALF: define [[FNATTRS]] i16 @_Z16test_clamp_short
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -o - | FileCheck %s
|
||||
|
||||
// CHECK: define void @{{.*}}builtin_clip_float{{.*}}(float {{.*}} [[P0:%.*]])
|
||||
// CHECK: define hidden void @{{.*}}builtin_clip_float{{.*}}(float {{.*}} [[P0:%.*]])
|
||||
// CHECK: [[LOAD:%.*]] = load float, ptr [[P0]].addr, align 4
|
||||
// CHECK-NEXT: [[FCMP:%.*]] = fcmp reassoc nnan ninf nsz arcp afn olt float [[LOAD]], 0.000000e+00
|
||||
// CHECK-NO: call i1 @llvm.dx.any
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
|
||||
void test_scalar(float Buf) {
|
||||
// CHECK: define void @{{.*}}test_scalar{{.*}}(float {{.*}} [[VALP:%.*]])
|
||||
// CHECK: define hidden void @{{.*}}test_scalar{{.*}}(float {{.*}} [[VALP:%.*]])
|
||||
// CHECK: [[LOAD:%.*]] = load float, ptr [[VALP]].addr, align 4
|
||||
// CHECK-NEXT: [[FCMP:%.*]] = fcmp reassoc nnan ninf nsz arcp afn olt float [[LOAD]], 0.000000e+00
|
||||
// CHECK-NO: call i1 @llvm.dx.any
|
||||
// CHECK-NEXT: call void @llvm.dx.discard(i1 [[FCMP]])
|
||||
//
|
||||
// SPIRV: define spir_func void @{{.*}}test_scalar{{.*}}(float {{.*}} [[VALP:%.*]])
|
||||
// SPIRV: define hidden spir_func void @{{.*}}test_scalar{{.*}}(float {{.*}} [[VALP:%.*]])
|
||||
// SPIRV: [[LOAD:%.*]] = load float, ptr [[VALP]].addr, align 4
|
||||
// SPIRV-NEXT: [[FCMP:%.*]] = fcmp reassoc nnan ninf nsz arcp afn olt float [[LOAD]], 0.000000e+00
|
||||
// SPIRV-NO: call i1 @llvm.spv.any
|
||||
@@ -21,13 +21,13 @@ void test_scalar(float Buf) {
|
||||
}
|
||||
|
||||
void test_vector4(float4 Buf) {
|
||||
// CHECK: define void @{{.*}}test_vector{{.*}}(<4 x float> {{.*}} [[VALP:%.*]])
|
||||
// CHECK: define hidden void @{{.*}}test_vector{{.*}}(<4 x float> {{.*}} [[VALP:%.*]])
|
||||
// CHECK: [[LOAD:%.*]] = load <4 x float>, ptr [[VALP]].addr, align 16
|
||||
// CHECK-NEXT: [[FCMP:%.*]] = fcmp reassoc nnan ninf nsz arcp afn olt <4 x float> [[LOAD]], zeroinitializer
|
||||
// CHECK-NEXT: [[ANYC:%.*]] = call i1 @llvm.dx.any.v4i1(<4 x i1> [[FCMP]])
|
||||
// CHECK-NEXT: call void @llvm.dx.discard(i1 [[ANYC]])
|
||||
//
|
||||
// SPIRV: define spir_func void @{{.*}}test_vector{{.*}}(<4 x float> {{.*}} [[VALP:%.*]])
|
||||
// SPIRV: define hidden spir_func void @{{.*}}test_vector{{.*}}(<4 x float> {{.*}} [[VALP:%.*]])
|
||||
// SPIRV: [[LOAD:%.*]] = load <4 x float>, ptr [[VALP]].addr, align 16
|
||||
// SPIRV-NEXT: [[FCMP:%.*]] = fcmp reassoc nnan ninf nsz arcp afn olt <4 x float> [[LOAD]], zeroinitializer
|
||||
// SPIRV-NEXT: [[ANYC:%.*]] = call i1 @llvm.spv.any.v4i1(<4 x i1> [[FCMP]])
|
||||
|
||||
@@ -2,67 +2,67 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_cos_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_cos_double
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.cos.f32(
|
||||
float test_cos_double(double p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_cos_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_cos_double2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.cos.v2f32
|
||||
float2 test_cos_double2(double2 p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_cos_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_cos_double3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.cos.v3f32
|
||||
float3 test_cos_double3(double3 p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_cos_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_cos_double4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.cos.v4f32
|
||||
float4 test_cos_double4(double4 p0) { return cos(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_cos_int
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_cos_int
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.cos.f32(
|
||||
float test_cos_int(int p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_cos_int2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_cos_int2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.cos.v2f32
|
||||
float2 test_cos_int2(int2 p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_cos_int3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_cos_int3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.cos.v3f32
|
||||
float3 test_cos_int3(int3 p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_cos_int4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_cos_int4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.cos.v4f32
|
||||
float4 test_cos_int4(int4 p0) { return cos(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_cos_uint
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_cos_uint
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.cos.f32(
|
||||
float test_cos_uint(uint p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_cos_uint2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_cos_uint2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.cos.v2f32
|
||||
float2 test_cos_uint2(uint2 p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_cos_uint3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_cos_uint3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.cos.v3f32
|
||||
float3 test_cos_uint3(uint3 p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_cos_uint4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_cos_uint4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.cos.v4f32
|
||||
float4 test_cos_uint4(uint4 p0) { return cos(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_cos_int64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_cos_int64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.cos.f32(
|
||||
float test_cos_int64_t(int64_t p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_cos_int64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_cos_int64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.cos.v2f32
|
||||
float2 test_cos_int64_t2(int64_t2 p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_cos_int64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_cos_int64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.cos.v3f32
|
||||
float3 test_cos_int64_t3(int64_t3 p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_cos_int64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_cos_int64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.cos.v4f32
|
||||
float4 test_cos_int64_t4(int64_t4 p0) { return cos(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_cos_uint64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_cos_uint64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.cos.f32(
|
||||
float test_cos_uint64_t(uint64_t p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_cos_uint64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_cos_uint64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.cos.v2f32
|
||||
float2 test_cos_uint64_t2(uint64_t2 p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_cos_uint64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_cos_uint64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.cos.v3f32
|
||||
float3 test_cos_uint64_t3(uint64_t3 p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_cos_uint64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_cos_uint64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.cos.v4f32
|
||||
float4 test_cos_uint64_t4(uint64_t4 p0) { return cos(p0); }
|
||||
|
||||
@@ -5,36 +5,36 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z13test_cos_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z13test_cos_half
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.cos.f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z13test_cos_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z13test_cos_half
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.cos.f32(
|
||||
half test_cos_half(half p0) { return cos(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z14test_cos_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z14test_cos_half2
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.cos.v2f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z14test_cos_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z14test_cos_half2
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.cos.v2f32(
|
||||
half2 test_cos_half2(half2 p0) { return cos(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z14test_cos_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z14test_cos_half3
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.cos.v3f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z14test_cos_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z14test_cos_half3
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.cos.v3f32(
|
||||
half3 test_cos_half3(half3 p0) { return cos(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z14test_cos_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z14test_cos_half4
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.cos.v4f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z14test_cos_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z14test_cos_half4
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.cos.v4f32(
|
||||
half4 test_cos_half4(half4 p0) { return cos(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z14test_cos_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_cos_float
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.cos.f32(
|
||||
float test_cos_float(float p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z15test_cos_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_cos_float2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.cos.v2f32
|
||||
float2 test_cos_float2(float2 p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z15test_cos_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_cos_float3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.cos.v3f32
|
||||
float3 test_cos_float3(float3 p0) { return cos(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z15test_cos_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_cos_float4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.cos.v4f32
|
||||
float4 test_cos_float4(float4 p0) { return cos(p0); }
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
|
||||
// NATIVE_HALF: define [[FNATTRS]] <3 x half> @
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.[[TARGET]].cross.v3f16(<3 x half>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
|
||||
// CHECK: define [[FNATTRS]] float @
|
||||
// CHECK: %hlsl.degrees = call reassoc nnan ninf nsz arcp afn float @llvm.[[TARGET]].degrees.f32(
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -finclude-default-header -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -finclude-default-header -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: %clang_cc1 -finclude-default-header -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
|
||||
// NATIVE_HALF: define [[FNATTRS]] half @
|
||||
// NATIVE_HALF: %hlsl.degrees = call reassoc nnan ninf nsz arcp afn half @llvm.[[TARGET]].degrees.f16(
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -O1 -o - | FileCheck %s --check-prefix=SPVCHECK
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) half @_Z18test_distance_halfDhDh(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) half @_Z18test_distance_halfDhDh(
|
||||
// CHECK-SAME: half noundef nofpclass(nan inf) [[X:%.*]], half noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn half [[X]], [[Y]]
|
||||
// CHECK-NEXT: [[ELT_ABS_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef half @llvm.fabs.f16(half nofpclass(nan inf) [[SUB_I]])
|
||||
// CHECK-NEXT: ret half [[ELT_ABS_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) half @_Z18test_distance_halfDhDh(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) half @_Z18test_distance_halfDhDh(
|
||||
// SPVCHECK-SAME: half noundef nofpclass(nan inf) [[X:%.*]], half noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn half [[X]], [[Y]]
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
half test_distance_half(half X, half Y) { return distance(X, Y); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) half @_Z19test_distance_half2Dv2_DhS_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) half @_Z19test_distance_half2Dv2_DhS_(
|
||||
// CHECK-SAME: <2 x half> noundef nofpclass(nan inf) [[X:%.*]], <2 x half> noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <2 x half> [[X]], [[Y]]
|
||||
@@ -30,7 +30,7 @@ half test_distance_half(half X, half Y) { return distance(X, Y); }
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef half @llvm.sqrt.f16(half [[HLSL_DOT_I]])
|
||||
// CHECK-NEXT: ret half [[TMP0]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) half @_Z19test_distance_half2Dv2_DhS_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) half @_Z19test_distance_half2Dv2_DhS_(
|
||||
// SPVCHECK-SAME: <2 x half> noundef nofpclass(nan inf) [[X:%.*]], <2 x half> noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <2 x half> [[X]], [[Y]]
|
||||
@@ -39,7 +39,7 @@ half test_distance_half(half X, half Y) { return distance(X, Y); }
|
||||
//
|
||||
half test_distance_half2(half2 X, half2 Y) { return distance(X, Y); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) half @_Z19test_distance_half3Dv3_DhS_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) half @_Z19test_distance_half3Dv3_DhS_(
|
||||
// CHECK-SAME: <3 x half> noundef nofpclass(nan inf) [[X:%.*]], <3 x half> noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <3 x half> [[X]], [[Y]]
|
||||
@@ -47,7 +47,7 @@ half test_distance_half2(half2 X, half2 Y) { return distance(X, Y); }
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef half @llvm.sqrt.f16(half [[HLSL_DOT_I]])
|
||||
// CHECK-NEXT: ret half [[TMP0]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) half @_Z19test_distance_half3Dv3_DhS_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) half @_Z19test_distance_half3Dv3_DhS_(
|
||||
// SPVCHECK-SAME: <3 x half> noundef nofpclass(nan inf) [[X:%.*]], <3 x half> noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <3 x half> [[X]], [[Y]]
|
||||
@@ -56,7 +56,7 @@ half test_distance_half2(half2 X, half2 Y) { return distance(X, Y); }
|
||||
//
|
||||
half test_distance_half3(half3 X, half3 Y) { return distance(X, Y); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) half @_Z19test_distance_half4Dv4_DhS_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) half @_Z19test_distance_half4Dv4_DhS_(
|
||||
// CHECK-SAME: <4 x half> noundef nofpclass(nan inf) [[X:%.*]], <4 x half> noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <4 x half> [[X]], [[Y]]
|
||||
@@ -64,7 +64,7 @@ half test_distance_half3(half3 X, half3 Y) { return distance(X, Y); }
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef half @llvm.sqrt.f16(half [[HLSL_DOT_I]])
|
||||
// CHECK-NEXT: ret half [[TMP0]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) half @_Z19test_distance_half4Dv4_DhS_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) half @_Z19test_distance_half4Dv4_DhS_(
|
||||
// SPVCHECK-SAME: <4 x half> noundef nofpclass(nan inf) [[X:%.*]], <4 x half> noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <4 x half> [[X]], [[Y]]
|
||||
@@ -73,14 +73,14 @@ half test_distance_half3(half3 X, half3 Y) { return distance(X, Y); }
|
||||
//
|
||||
half test_distance_half4(half4 X, half4 Y) { return distance(X, Y); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z19test_distance_floatff(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z19test_distance_floatff(
|
||||
// CHECK-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[X]], [[Y]]
|
||||
// CHECK-NEXT: [[ELT_ABS_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef float @llvm.fabs.f32(float nofpclass(nan inf) [[SUB_I]])
|
||||
// CHECK-NEXT: ret float [[ELT_ABS_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) float @_Z19test_distance_floatff(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) float @_Z19test_distance_floatff(
|
||||
// SPVCHECK-SAME: float noundef nofpclass(nan inf) [[X:%.*]], float noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[X]], [[Y]]
|
||||
@@ -89,7 +89,7 @@ half test_distance_half4(half4 X, half4 Y) { return distance(X, Y); }
|
||||
//
|
||||
float test_distance_float(float X, float Y) { return distance(X, Y); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z20test_distance_float2Dv2_fS_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z20test_distance_float2Dv2_fS_(
|
||||
// CHECK-SAME: <2 x float> noundef nofpclass(nan inf) [[X:%.*]], <2 x float> noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <2 x float> [[X]], [[Y]]
|
||||
@@ -97,7 +97,7 @@ float test_distance_float(float X, float Y) { return distance(X, Y); }
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef float @llvm.sqrt.f32(float [[HLSL_DOT_I]])
|
||||
// CHECK-NEXT: ret float [[TMP0]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) float @_Z20test_distance_float2Dv2_fS_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) float @_Z20test_distance_float2Dv2_fS_(
|
||||
// SPVCHECK-SAME: <2 x float> noundef nofpclass(nan inf) [[X:%.*]], <2 x float> noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <2 x float> [[X]], [[Y]]
|
||||
@@ -106,7 +106,7 @@ float test_distance_float(float X, float Y) { return distance(X, Y); }
|
||||
//
|
||||
float test_distance_float2(float2 X, float2 Y) { return distance(X, Y); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z20test_distance_float3Dv3_fS_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z20test_distance_float3Dv3_fS_(
|
||||
// CHECK-SAME: <3 x float> noundef nofpclass(nan inf) [[X:%.*]], <3 x float> noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <3 x float> [[X]], [[Y]]
|
||||
@@ -114,7 +114,7 @@ float test_distance_float2(float2 X, float2 Y) { return distance(X, Y); }
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef float @llvm.sqrt.f32(float [[HLSL_DOT_I]])
|
||||
// CHECK-NEXT: ret float [[TMP0]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) float @_Z20test_distance_float3Dv3_fS_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) float @_Z20test_distance_float3Dv3_fS_(
|
||||
// SPVCHECK-SAME: <3 x float> noundef nofpclass(nan inf) [[X:%.*]], <3 x float> noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <3 x float> [[X]], [[Y]]
|
||||
@@ -123,7 +123,7 @@ float test_distance_float2(float2 X, float2 Y) { return distance(X, Y); }
|
||||
//
|
||||
float test_distance_float3(float3 X, float3 Y) { return distance(X, Y); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z20test_distance_float4Dv4_fS_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z20test_distance_float4Dv4_fS_(
|
||||
// CHECK-SAME: <4 x float> noundef nofpclass(nan inf) [[X:%.*]], <4 x float> noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <4 x float> [[X]], [[Y]]
|
||||
@@ -131,7 +131,7 @@ float test_distance_float3(float3 X, float3 Y) { return distance(X, Y); }
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef float @llvm.sqrt.f32(float [[HLSL_DOT_I]])
|
||||
// CHECK-NEXT: ret float [[TMP0]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) float @_Z20test_distance_float4Dv4_fS_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) float @_Z20test_distance_float4Dv4_fS_(
|
||||
// SPVCHECK-SAME: <4 x float> noundef nofpclass(nan inf) [[X:%.*]], <4 x float> noundef nofpclass(nan inf) [[Y:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <4 x float> [[X]], [[Y]]
|
||||
|
||||
@@ -2,87 +2,87 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_exp_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp_double
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
|
||||
// CHECK: ret float %elt.exp
|
||||
float test_exp_double(double p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_double2
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
|
||||
// CHECK: ret <2 x float> %elt.exp
|
||||
float2 test_exp_double2(double2 p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_double3
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
|
||||
// CHECK: ret <3 x float> %elt.exp
|
||||
float3 test_exp_double3(double3 p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_double4
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
|
||||
// CHECK: ret <4 x float> %elt.exp
|
||||
float4 test_exp_double4(double4 p0) { return exp(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_exp_int
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp_int
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
|
||||
// CHECK: ret float %elt.exp
|
||||
float test_exp_int(int p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_int2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_int2
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
|
||||
// CHECK: ret <2 x float> %elt.exp
|
||||
float2 test_exp_int2(int2 p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_int3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_int3
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
|
||||
// CHECK: ret <3 x float> %elt.exp
|
||||
float3 test_exp_int3(int3 p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_int4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_int4
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
|
||||
// CHECK: ret <4 x float> %elt.exp
|
||||
float4 test_exp_int4(int4 p0) { return exp(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_exp_uint
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp_uint
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
|
||||
// CHECK: ret float %elt.exp
|
||||
float test_exp_uint(uint p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_uint2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_uint2
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
|
||||
// CHECK: ret <2 x float> %elt.exp
|
||||
float2 test_exp_uint2(uint2 p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_uint3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_uint3
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
|
||||
// CHECK: ret <3 x float> %elt.exp
|
||||
float3 test_exp_uint3(uint3 p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_uint4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_uint4
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
|
||||
// CHECK: ret <4 x float> %elt.exp
|
||||
float4 test_exp_uint4(uint4 p0) { return exp(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_exp_int64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp_int64_t
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
|
||||
// CHECK: ret float %elt.exp
|
||||
float test_exp_int64_t(int64_t p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_int64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_int64_t2
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
|
||||
// CHECK: ret <2 x float> %elt.exp
|
||||
float2 test_exp_int64_t2(int64_t2 p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_int64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_int64_t3
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
|
||||
// CHECK: ret <3 x float> %elt.exp
|
||||
float3 test_exp_int64_t3(int64_t3 p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_int64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_int64_t4
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
|
||||
// CHECK: ret <4 x float> %elt.exp
|
||||
float4 test_exp_int64_t4(int64_t4 p0) { return exp(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_exp_uint64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp_uint64_t
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
|
||||
// CHECK: ret float %elt.exp
|
||||
float test_exp_uint64_t(uint64_t p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_uint64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_uint64_t2
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
|
||||
// CHECK: ret <2 x float> %elt.exp
|
||||
float2 test_exp_uint64_t2(uint64_t2 p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_uint64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_uint64_t3
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
|
||||
// CHECK: ret <3 x float> %elt.exp
|
||||
float3 test_exp_uint64_t3(uint64_t3 p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_uint64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_uint64_t4
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
|
||||
// CHECK: ret <4 x float> %elt.exp
|
||||
float4 test_exp_uint64_t4(uint64_t4 p0) { return exp(p0); }
|
||||
|
||||
@@ -5,48 +5,48 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z13test_exp_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z13test_exp_half
|
||||
// NATIVE_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn half @llvm.exp.f16(
|
||||
// NATIVE_HALF: ret half %elt.exp
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z13test_exp_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z13test_exp_half
|
||||
// NO_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
|
||||
// NO_HALF: ret float %elt.exp
|
||||
half test_exp_half(half p0) { return exp(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z14test_exp_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z14test_exp_half2
|
||||
// NATIVE_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.exp.v2f16
|
||||
// NATIVE_HALF: ret <2 x half> %elt.exp
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z14test_exp_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z14test_exp_half2
|
||||
// NO_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32(
|
||||
// NO_HALF: ret <2 x float> %elt.exp
|
||||
half2 test_exp_half2(half2 p0) { return exp(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z14test_exp_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z14test_exp_half3
|
||||
// NATIVE_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.exp.v3f16
|
||||
// NATIVE_HALF: ret <3 x half> %elt.exp
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z14test_exp_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z14test_exp_half3
|
||||
// NO_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32(
|
||||
// NO_HALF: ret <3 x float> %elt.exp
|
||||
half3 test_exp_half3(half3 p0) { return exp(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z14test_exp_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z14test_exp_half4
|
||||
// NATIVE_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.exp.v4f16
|
||||
// NATIVE_HALF: ret <4 x half> %elt.exp
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z14test_exp_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z14test_exp_half4
|
||||
// NO_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32(
|
||||
// NO_HALF: ret <4 x float> %elt.exp
|
||||
half4 test_exp_half4(half4 p0) { return exp(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z14test_exp_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_exp_float
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
|
||||
// CHECK: ret float %elt.exp
|
||||
float test_exp_float(float p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z15test_exp_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_exp_float2
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
|
||||
// CHECK: ret <2 x float> %elt.exp
|
||||
float2 test_exp_float2(float2 p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z15test_exp_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_exp_float3
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
|
||||
// CHECK: ret <3 x float> %elt.exp
|
||||
float3 test_exp_float3(float3 p0) { return exp(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z15test_exp_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_exp_float4
|
||||
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
|
||||
// CHECK: ret <4 x float> %elt.exp
|
||||
float4 test_exp_float4(float4 p0) { return exp(p0); }
|
||||
|
||||
@@ -2,87 +2,87 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_exp2_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp2_double
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
|
||||
// CHECK: ret float %elt.exp2
|
||||
float test_exp2_double(double p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_double2
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
|
||||
// CHECK: ret <2 x float> %elt.exp2
|
||||
float2 test_exp2_double2(double2 p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_double3
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
|
||||
// CHECK: ret <3 x float> %elt.exp2
|
||||
float3 test_exp2_double3(double3 p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_double4
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
|
||||
// CHECK: ret <4 x float> %elt.exp2
|
||||
float4 test_exp2_double4(double4 p0) { return exp2(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_exp2_int
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp2_int
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
|
||||
// CHECK: ret float %elt.exp2
|
||||
float test_exp2_int(int p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_int2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_int2
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
|
||||
// CHECK: ret <2 x float> %elt.exp2
|
||||
float2 test_exp2_int2(int2 p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_int3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_int3
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
|
||||
// CHECK: ret <3 x float> %elt.exp2
|
||||
float3 test_exp2_int3(int3 p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_int4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_int4
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
|
||||
// CHECK: ret <4 x float> %elt.exp2
|
||||
float4 test_exp2_int4(int4 p0) { return exp2(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_exp2_uint
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp2_uint
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
|
||||
// CHECK: ret float %elt.exp2
|
||||
float test_exp2_uint(uint p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_uint2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_uint2
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
|
||||
// CHECK: ret <2 x float> %elt.exp2
|
||||
float2 test_exp2_uint2(uint2 p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_uint3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_uint3
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
|
||||
// CHECK: ret <3 x float> %elt.exp2
|
||||
float3 test_exp2_uint3(uint3 p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_uint4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_uint4
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
|
||||
// CHECK: ret <4 x float> %elt.exp2
|
||||
float4 test_exp2_uint4(uint4 p0) { return exp2(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_exp2_int64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp2_int64_t
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
|
||||
// CHECK: ret float %elt.exp2
|
||||
float test_exp2_int64_t(int64_t p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_int64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_int64_t2
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
|
||||
// CHECK: ret <2 x float> %elt.exp2
|
||||
float2 test_exp2_int64_t2(int64_t2 p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_int64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_int64_t3
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
|
||||
// CHECK: ret <3 x float> %elt.exp2
|
||||
float3 test_exp2_int64_t3(int64_t3 p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_int64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_int64_t4
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
|
||||
// CHECK: ret <4 x float> %elt.exp2
|
||||
float4 test_exp2_int64_t4(int64_t4 p0) { return exp2(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_exp2_uint64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp2_uint64_t
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
|
||||
// CHECK: ret float %elt.exp2
|
||||
float test_exp2_uint64_t(uint64_t p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_uint64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_uint64_t2
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
|
||||
// CHECK: ret <2 x float> %elt.exp2
|
||||
float2 test_exp2_uint64_t2(uint64_t2 p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_uint64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_uint64_t3
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
|
||||
// CHECK: ret <3 x float> %elt.exp2
|
||||
float3 test_exp2_uint64_t3(uint64_t3 p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_uint64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_uint64_t4
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
|
||||
// CHECK: ret <4 x float> %elt.exp2
|
||||
float4 test_exp2_uint64_t4(uint64_t4 p0) { return exp2(p0); }
|
||||
|
||||
@@ -5,48 +5,48 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z14test_exp2_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z14test_exp2_half
|
||||
// NATIVE_HALF: %elt.exp2 = call reassoc nnan ninf nsz arcp afn half @llvm.exp2.f16(
|
||||
// NATIVE_HALF: ret half %elt.exp2
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z14test_exp2_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_exp2_half
|
||||
// NO_HALF: %elt.exp2 = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
|
||||
// NO_HALF: ret float %elt.exp2
|
||||
half test_exp2_half(half p0) { return exp2(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z15test_exp2_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z15test_exp2_half2
|
||||
// NATIVE_HALF: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.exp2.v2f16
|
||||
// NATIVE_HALF: ret <2 x half> %elt.exp2
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z15test_exp2_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_exp2_half2
|
||||
// NO_HALF: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32(
|
||||
// NO_HALF: ret <2 x float> %elt.exp2
|
||||
half2 test_exp2_half2(half2 p0) { return exp2(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z15test_exp2_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z15test_exp2_half3
|
||||
// NATIVE_HALF: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.exp2.v3f16
|
||||
// NATIVE_HALF: ret <3 x half> %elt.exp2
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z15test_exp2_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_exp2_half3
|
||||
// NO_HALF: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32(
|
||||
// NO_HALF: ret <3 x float> %elt.exp2
|
||||
half3 test_exp2_half3(half3 p0) { return exp2(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z15test_exp2_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z15test_exp2_half4
|
||||
// NATIVE_HALF: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.exp2.v4f16
|
||||
// NATIVE_HALF: ret <4 x half> %elt.exp2
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z15test_exp2_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_exp2_half4
|
||||
// NO_HALF: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32(
|
||||
// NO_HALF: ret <4 x float> %elt.exp2
|
||||
half4 test_exp2_half4(half4 p0) { return exp2(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z15test_exp2_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z15test_exp2_float
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
|
||||
// CHECK: ret float %elt.exp2
|
||||
float test_exp2_float(float p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z16test_exp2_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z16test_exp2_float2
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
|
||||
// CHECK: ret <2 x float> %elt.exp2
|
||||
float2 test_exp2_float2(float2 p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z16test_exp2_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z16test_exp2_float3
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
|
||||
// CHECK: ret <3 x float> %elt.exp2
|
||||
float3 test_exp2_float3(float3 p0) { return exp2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z16test_exp2_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z16test_exp2_float4
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
|
||||
// CHECK: ret <4 x float> %elt.exp2
|
||||
float4 test_exp2_float4(float4 p0) { return exp2(p0); }
|
||||
|
||||
@@ -4,67 +4,67 @@
|
||||
|
||||
using hlsl::floor;
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_floor_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_floor_double
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.floor.f32(
|
||||
float test_floor_double(double p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_double2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.floor.v2f32(
|
||||
float2 test_floor_double2(double2 p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_double3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.floor.v3f32(
|
||||
float3 test_floor_double3(double3 p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_double4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.floor.v4f32(
|
||||
float4 test_floor_double4(double4 p0) { return floor(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_floor_int
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_floor_int
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.floor.f32(
|
||||
float test_floor_int(int p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_int2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_int2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.floor.v2f32(
|
||||
float2 test_floor_int2(int2 p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_int3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_int3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.floor.v3f32(
|
||||
float3 test_floor_int3(int3 p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_int4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_int4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.floor.v4f32(
|
||||
float4 test_floor_int4(int4 p0) { return floor(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_floor_uint
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_floor_uint
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.floor.f32(
|
||||
float test_floor_uint(uint p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_uint2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_uint2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.floor.v2f32(
|
||||
float2 test_floor_uint2(uint2 p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_uint3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_uint3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.floor.v3f32(
|
||||
float3 test_floor_uint3(uint3 p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_uint4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_uint4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.floor.v4f32(
|
||||
float4 test_floor_uint4(uint4 p0) { return floor(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_floor_int64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_floor_int64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.floor.f32(
|
||||
float test_floor_int64_t(int64_t p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_int64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_int64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.floor.v2f32(
|
||||
float2 test_floor_int64_t2(int64_t2 p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_int64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_int64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.floor.v3f32(
|
||||
float3 test_floor_int64_t3(int64_t3 p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_int64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_int64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.floor.v4f32(
|
||||
float4 test_floor_int64_t4(int64_t4 p0) { return floor(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_floor_uint64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_floor_uint64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.floor.f32(
|
||||
float test_floor_uint64_t(uint64_t p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_uint64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_uint64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.floor.v2f32(
|
||||
float2 test_floor_uint64_t2(uint64_t2 p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_uint64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_uint64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.floor.v3f32(
|
||||
float3 test_floor_uint64_t3(uint64_t3 p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_uint64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_uint64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.floor.v4f32(
|
||||
float4 test_floor_uint64_t4(uint64_t4 p0) { return floor(p0); }
|
||||
|
||||
@@ -7,36 +7,36 @@
|
||||
|
||||
using hlsl::floor;
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z15test_floor_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z15test_floor_half
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.floor.f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z15test_floor_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z15test_floor_half
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.floor.f32(float %0)
|
||||
half test_floor_half(half p0) { return floor(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z16test_floor_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z16test_floor_half2
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.floor.v2f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z16test_floor_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z16test_floor_half2
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.floor.v2f32(
|
||||
half2 test_floor_half2(half2 p0) { return floor(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z16test_floor_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z16test_floor_half3
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.floor.v3f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z16test_floor_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z16test_floor_half3
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.floor.v3f32(
|
||||
half3 test_floor_half3(half3 p0) { return floor(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z16test_floor_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z16test_floor_half4
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.floor.v4f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z16test_floor_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z16test_floor_half4
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.floor.v4f32(
|
||||
half4 test_floor_half4(half4 p0) { return floor(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z16test_floor_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z16test_floor_float
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.floor.f32(
|
||||
float test_floor_float(float p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z17test_floor_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z17test_floor_float2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.floor.v2f32(
|
||||
float2 test_floor_float2(float2 p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z17test_floor_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z17test_floor_float3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.floor.v3f32(
|
||||
float3 test_floor_float3(float3 p0) { return floor(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z17test_floor_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z17test_floor_float4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.floor.v4f32(
|
||||
float4 test_floor_float4(float4 p0) { return floor(p0); }
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -o - | FileCheck %s -DFNATTRS="noundef nofpclass(nan inf)" \
|
||||
// RUN: -emit-llvm -o - | FileCheck %s -DFNATTRS="hidden noundef nofpclass(nan inf)" \
|
||||
// RUN: -DTYPE=half -DINT_TYPE=f16 --check-prefixes=DXCHECK
|
||||
|
||||
//
|
||||
@@ -12,7 +12,7 @@
|
||||
//
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm \
|
||||
// RUN: -o - | FileCheck %s -DFNATTRS="noundef nofpclass(nan inf)" \
|
||||
// RUN: -o - | FileCheck %s -DFNATTRS="hidden noundef nofpclass(nan inf)" \
|
||||
// RUN: -DTYPE=float -DINT_TYPE=f32 --check-prefixes=DXCHECK
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -o - | FileCheck %s \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTYPE=half
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTYPE=half
|
||||
|
||||
//
|
||||
// ---------- No Native Half support test -----------
|
||||
@@ -31,7 +31,7 @@
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm \
|
||||
// RUN: -o - | FileCheck %s \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTYPE=float
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTYPE=float
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
|
||||
// CHECK: define [[FNATTRS]] float @
|
||||
// CHECK: %hlsl.frac = call reassoc nnan ninf nsz arcp afn float @llvm.[[TARGET]].frac.f32(
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
|
||||
// NATIVE_HALF: define [[FNATTRS]] half @
|
||||
// NATIVE_HALF: %hlsl.frac = call reassoc nnan ninf nsz arcp afn half @llvm.[[TARGET]].frac.f16(
|
||||
|
||||
@@ -6,9 +6,9 @@ using handle_float_t = __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::c
|
||||
// CHECK: %"class.hlsl::StructuredBuffer" = type { target("dx.RawBuffer", %struct.MyStruct, 0, 0)
|
||||
// CHECK: %struct.MyStruct = type <{ <4 x float>, <2 x i32> }>
|
||||
|
||||
// CHECK: define void @_Z2faU9_Res_u_CTfu17__hlsl_resource_t(target("dx.TypedBuffer", float, 1, 0, 0) %a)
|
||||
// CHECK: define hidden void @_Z2faU9_Res_u_CTfu17__hlsl_resource_t(target("dx.TypedBuffer", float, 1, 0, 0) %a)
|
||||
// CHECK: call void @_Z4foo1U9_Res_u_CTfu17__hlsl_resource_t(target("dx.TypedBuffer", float, 1, 0, 0) %0)
|
||||
// CHECK: declare void @_Z4foo1U9_Res_u_CTfu17__hlsl_resource_t(target("dx.TypedBuffer", float, 1, 0, 0))
|
||||
// CHECK: declare hidden void @_Z4foo1U9_Res_u_CTfu17__hlsl_resource_t(target("dx.TypedBuffer", float, 1, 0, 0))
|
||||
|
||||
void foo1(handle_float_t res);
|
||||
|
||||
@@ -16,14 +16,14 @@ void fa(handle_float_t a) {
|
||||
foo1(a);
|
||||
}
|
||||
|
||||
// CHECK: define void @_Z2fbU9_Res_u_CTfu17__hlsl_resource_t(target("dx.TypedBuffer", float, 1, 0, 0) %a)
|
||||
// CHECK: define hidden void @_Z2fbU9_Res_u_CTfu17__hlsl_resource_t(target("dx.TypedBuffer", float, 1, 0, 0) %a)
|
||||
void fb(handle_float_t a) {
|
||||
handle_float_t b = a;
|
||||
}
|
||||
|
||||
// CHECK: define void @_Z2fcN4hlsl8RWBufferIDv4_fEE(ptr noundef byval(%"class.hlsl::RWBuffer") align 4 %a)
|
||||
// CHECK: define hidden void @_Z2fcN4hlsl8RWBufferIDv4_fEE(ptr noundef byval(%"class.hlsl::RWBuffer") align 4 %a)
|
||||
// CHECK: call void @_Z4foo2N4hlsl8RWBufferIDv4_fEE(ptr noundef byval(%"class.hlsl::RWBuffer") align 4 %agg.tmp)
|
||||
// CHECK: declare void @_Z4foo2N4hlsl8RWBufferIDv4_fEE(ptr noundef byval(%"class.hlsl::RWBuffer") align 4)
|
||||
// CHECK: declare hidden void @_Z4foo2N4hlsl8RWBufferIDv4_fEE(ptr noundef byval(%"class.hlsl::RWBuffer") align 4)
|
||||
void foo2(RWBuffer<float4> buf);
|
||||
|
||||
void fc(RWBuffer<float4> a) {
|
||||
@@ -39,9 +39,9 @@ struct MyStruct {
|
||||
int2 i;
|
||||
};
|
||||
|
||||
// CHECK: define void @_Z2feN4hlsl16StructuredBufferI8MyStructEE(ptr noundef byval(%"class.hlsl::StructuredBuffer") align 4 %a)
|
||||
// CHECK: define hidden void @_Z2feN4hlsl16StructuredBufferI8MyStructEE(ptr noundef byval(%"class.hlsl::StructuredBuffer") align 4 %a)
|
||||
// CHECK: call void @_Z4foo3N4hlsl16StructuredBufferI8MyStructEE(ptr noundef byval(%"class.hlsl::StructuredBuffer") align 4 %agg.tmp)
|
||||
// CHECK: declare void @_Z4foo3N4hlsl16StructuredBufferI8MyStructEE(ptr noundef byval(%"class.hlsl::StructuredBuffer") align 4)
|
||||
// CHECK: declare hidden void @_Z4foo3N4hlsl16StructuredBufferI8MyStructEE(ptr noundef byval(%"class.hlsl::StructuredBuffer") align 4)
|
||||
void foo3(StructuredBuffer<MyStruct> buf);
|
||||
|
||||
void fe(StructuredBuffer<MyStruct> a) {
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s
|
||||
|
||||
// CHECK: define noundef i1 @
|
||||
// CHECK: define hidden noundef i1 @
|
||||
// CHECK: %dx.isinf = call i1 @llvm.dx.isinf.f32(
|
||||
// CHECK: ret i1 %dx.isinf
|
||||
bool test_isinf_double(double p0) { return isinf(p0); }
|
||||
// CHECK: define noundef <2 x i1> @
|
||||
// CHECK: define hidden noundef <2 x i1> @
|
||||
// CHECK: %dx.isinf = call <2 x i1> @llvm.dx.isinf.v2f32
|
||||
// CHECK: ret <2 x i1> %dx.isinf
|
||||
bool2 test_isinf_double2(double2 p0) { return isinf(p0); }
|
||||
// CHECK: define noundef <3 x i1> @
|
||||
// CHECK: define hidden noundef <3 x i1> @
|
||||
// CHECK: %dx.isinf = call <3 x i1> @llvm.dx.isinf.v3f32
|
||||
// CHECK: ret <3 x i1> %dx.isinf
|
||||
bool3 test_isinf_double3(double3 p0) { return isinf(p0); }
|
||||
// CHECK: define noundef <4 x i1> @
|
||||
// CHECK: define hidden noundef <4 x i1> @
|
||||
// CHECK: %dx.isinf = call <4 x i1> @llvm.dx.isinf.v4f32
|
||||
// CHECK: ret <4 x i1> %dx.isinf
|
||||
bool4 test_isinf_double4(double4 p0) { return isinf(p0); }
|
||||
|
||||
@@ -6,40 +6,40 @@
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
// CHECK: define noundef i1 @
|
||||
// CHECK: define hidden noundef i1 @
|
||||
// NATIVE_HALF: %dx.isinf = call i1 @llvm.dx.isinf.f16(
|
||||
// NO_HALF: %dx.isinf = call i1 @llvm.dx.isinf.f32(
|
||||
// CHECK: ret i1 %dx.isinf
|
||||
bool test_isinf_half(half p0) { return isinf(p0); }
|
||||
// CHECK: define noundef <2 x i1> @
|
||||
// CHECK: define hidden noundef <2 x i1> @
|
||||
// NATIVE_HALF: %dx.isinf = call <2 x i1> @llvm.dx.isinf.v2f16
|
||||
// NO_HALF: %dx.isinf = call <2 x i1> @llvm.dx.isinf.v2f32(
|
||||
// CHECK: ret <2 x i1> %dx.isinf
|
||||
bool2 test_isinf_half2(half2 p0) { return isinf(p0); }
|
||||
// NATIVE_HALF: define noundef <3 x i1> @
|
||||
// NATIVE_HALF: define hidden noundef <3 x i1> @
|
||||
// NATIVE_HALF: %dx.isinf = call <3 x i1> @llvm.dx.isinf.v3f16
|
||||
// NO_HALF: %dx.isinf = call <3 x i1> @llvm.dx.isinf.v3f32(
|
||||
// CHECK: ret <3 x i1> %dx.isinf
|
||||
bool3 test_isinf_half3(half3 p0) { return isinf(p0); }
|
||||
// NATIVE_HALF: define noundef <4 x i1> @
|
||||
// NATIVE_HALF: define hidden noundef <4 x i1> @
|
||||
// NATIVE_HALF: %dx.isinf = call <4 x i1> @llvm.dx.isinf.v4f16
|
||||
// NO_HALF: %dx.isinf = call <4 x i1> @llvm.dx.isinf.v4f32(
|
||||
// CHECK: ret <4 x i1> %dx.isinf
|
||||
bool4 test_isinf_half4(half4 p0) { return isinf(p0); }
|
||||
|
||||
// CHECK: define noundef i1 @
|
||||
// CHECK: define hidden noundef i1 @
|
||||
// CHECK: %dx.isinf = call i1 @llvm.dx.isinf.f32(
|
||||
// CHECK: ret i1 %dx.isinf
|
||||
bool test_isinf_float(float p0) { return isinf(p0); }
|
||||
// CHECK: define noundef <2 x i1> @
|
||||
// CHECK: define hidden noundef <2 x i1> @
|
||||
// CHECK: %dx.isinf = call <2 x i1> @llvm.dx.isinf.v2f32
|
||||
// CHECK: ret <2 x i1> %dx.isinf
|
||||
bool2 test_isinf_float2(float2 p0) { return isinf(p0); }
|
||||
// CHECK: define noundef <3 x i1> @
|
||||
// CHECK: define hidden noundef <3 x i1> @
|
||||
// CHECK: %dx.isinf = call <3 x i1> @llvm.dx.isinf.v3f32
|
||||
// CHECK: ret <3 x i1> %dx.isinf
|
||||
bool3 test_isinf_float3(float3 p0) { return isinf(p0); }
|
||||
// CHECK: define noundef <4 x i1> @
|
||||
// CHECK: define hidden noundef <4 x i1> @
|
||||
// CHECK: %dx.isinf = call <4 x i1> @llvm.dx.isinf.v4f32
|
||||
// CHECK: ret <4 x i1> %dx.isinf
|
||||
bool4 test_isinf_float4(float4 p0) { return isinf(p0); }
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -o - | FileCheck %s
|
||||
|
||||
// CHECK-LABEL: define linkonce_odr noundef nofpclass(nan inf) half @_ZN4hlsl8__detail10ldexp_implIDhEET_S2_S2_
|
||||
// CHECK-LABEL: define linkonce_odr hidden noundef nofpclass(nan inf) half @_ZN4hlsl8__detail10ldexp_implIDhEET_S2_S2_
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn half @llvm.exp2.f16(half %{{.*}})
|
||||
// CHECK: %mul = fmul reassoc nnan ninf nsz arcp afn half %elt.exp2, %{{.*}}
|
||||
// CHECK: ret half %mul
|
||||
half test_ldexp_half(half X, half Exp) { return ldexp(X, Exp); }
|
||||
|
||||
// CHECK-LABEL: define linkonce_odr noundef nofpclass(nan inf) <2 x half> @_ZN4hlsl8__detail10ldexp_implIDv2_DhEET_S3_S3_
|
||||
// CHECK-LABEL: define linkonce_odr hidden noundef nofpclass(nan inf) <2 x half> @_ZN4hlsl8__detail10ldexp_implIDv2_DhEET_S3_S3_
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.exp2.v2f16(<2 x half> %{{.*}})
|
||||
// CHECK: %mul = fmul reassoc nnan ninf nsz arcp afn <2 x half> %elt.exp2, %{{.*}}
|
||||
// CHECK: ret <2 x half> %mul
|
||||
half2 test_ldexp_half2(half2 X, half2 Exp) { return ldexp(X, Exp); }
|
||||
|
||||
// CHECK-LABEL: define linkonce_odr noundef nofpclass(nan inf) <3 x half> @_ZN4hlsl8__detail10ldexp_implIDv3_DhEET_S3_S3_
|
||||
// CHECK-LABEL: define linkonce_odr hidden noundef nofpclass(nan inf) <3 x half> @_ZN4hlsl8__detail10ldexp_implIDv3_DhEET_S3_S3_
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.exp2.v3f16(<3 x half> %{{.*}})
|
||||
// CHECK: %mul = fmul reassoc nnan ninf nsz arcp afn <3 x half> %elt.exp2, %{{.*}}
|
||||
// CHECK: ret <3 x half> %mul
|
||||
half3 test_ldexp_half3(half3 X, half3 Exp) { return ldexp(X, Exp); }
|
||||
|
||||
// CHECK-LABEL: define linkonce_odr noundef nofpclass(nan inf) <4 x half> @_ZN4hlsl8__detail10ldexp_implIDv4_DhEET_S3_S3_
|
||||
// CHECK-LABEL: define linkonce_odr hidden noundef nofpclass(nan inf) <4 x half> @_ZN4hlsl8__detail10ldexp_implIDv4_DhEET_S3_S3_
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.exp2.v4f16(<4 x half> %{{.*}})
|
||||
// CHECK: %mul = fmul reassoc nnan ninf nsz arcp afn <4 x half> %elt.exp2, %{{.*}}
|
||||
// CHECK: ret <4 x half> %mul
|
||||
half4 test_ldexp_half4(half4 X, half4 Exp) { return ldexp(X, Exp); }
|
||||
|
||||
// CHECK-LABEL: define linkonce_odr noundef nofpclass(nan inf) float @_ZN4hlsl8__detail10ldexp_implIfEET_S2_S2_
|
||||
// CHECK-LABEL: define linkonce_odr hidden noundef nofpclass(nan inf) float @_ZN4hlsl8__detail10ldexp_implIfEET_S2_S2_
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(float %{{.*}})
|
||||
// CHECK: %mul = fmul reassoc nnan ninf nsz arcp afn float %elt.exp2, %{{.*}}
|
||||
// CHECK: ret float %mul
|
||||
float test_ldexp_float(float X, float Exp) { return ldexp(X, Exp); }
|
||||
|
||||
// CHECK-LABEL: define linkonce_odr noundef nofpclass(nan inf) <2 x float> @_ZN4hlsl8__detail10ldexp_implIDv2_fEET_S3_S3_
|
||||
// CHECK-LABEL: define linkonce_odr hidden noundef nofpclass(nan inf) <2 x float> @_ZN4hlsl8__detail10ldexp_implIDv2_fEET_S3_S3_
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32(<2 x float> %{{.*}})
|
||||
// CHECK: %mul = fmul reassoc nnan ninf nsz arcp afn <2 x float> %elt.exp2, %{{.*}}
|
||||
// CHECK: ret <2 x float> %mul
|
||||
float2 test_ldexp_float2(float2 X, float2 Exp) { return ldexp(X, Exp); }
|
||||
|
||||
// CHECK-LABEL: define linkonce_odr noundef nofpclass(nan inf) <3 x float> @_ZN4hlsl8__detail10ldexp_implIDv3_fEET_S3_S3_
|
||||
// CHECK-LABEL: define linkonce_odr hidden noundef nofpclass(nan inf) <3 x float> @_ZN4hlsl8__detail10ldexp_implIDv3_fEET_S3_S3_
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32(<3 x float> %{{.*}})
|
||||
// CHECK: %mul = fmul reassoc nnan ninf nsz arcp afn <3 x float> %elt.exp2, %{{.*}}
|
||||
// CHECK: ret <3 x float> %mul
|
||||
float3 test_ldexp_float3(float3 X, float3 Exp) { return ldexp(X, Exp); }
|
||||
|
||||
// CHECK-LABEL: define linkonce_odr noundef nofpclass(nan inf) <4 x float> @_ZN4hlsl8__detail10ldexp_implIDv4_fEET_S3_S3_
|
||||
// CHECK-LABEL: define linkonce_odr hidden noundef nofpclass(nan inf) <4 x float> @_ZN4hlsl8__detail10ldexp_implIDv4_fEET_S3_S3_
|
||||
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32(<4 x float> %{{.*}})
|
||||
// CHECK: %mul = fmul reassoc nnan ninf nsz arcp afn <4 x float> %elt.exp2, %{{.*}}
|
||||
// CHECK: ret <4 x float> %mul
|
||||
|
||||
@@ -8,16 +8,13 @@
|
||||
// RUN: -emit-llvm -O1 -o - | FileCheck %s --check-prefix=SPVCHECK
|
||||
|
||||
|
||||
// DXCHECK-LABEL: define noundef nofpclass(nan inf) half @_Z16test_length_halfDh(
|
||||
//
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) half @_Z16test_length_halfDh(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) half @_Z16test_length_halfDh(
|
||||
// CHECK-SAME: half noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[ELT_ABS_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef half @llvm.fabs.f16(half nofpclass(nan inf) [[P0]])
|
||||
// CHECK-NEXT: ret half [[ELT_ABS_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) half @_Z16test_length_halfDh(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) half @_Z16test_length_halfDh(
|
||||
// SPVCHECK-SAME: half noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[ELT_ABS_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef half @llvm.fabs.f16(half nofpclass(nan inf) [[P0]])
|
||||
@@ -28,18 +25,14 @@ half test_length_half(half p0)
|
||||
return length(p0);
|
||||
}
|
||||
|
||||
// DXCHECK-LABEL: define noundef nofpclass(nan inf) half @_Z17test_length_half2Dv2_Dh(
|
||||
//
|
||||
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) half @_Z17test_length_half2Dv2_Dh(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) half @_Z17test_length_half2Dv2_Dh(
|
||||
// CHECK-SAME: <2 x half> noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_DOT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn half @llvm.dx.fdot.v2f16(<2 x half> nofpclass(nan inf) [[P0]], <2 x half> nofpclass(nan inf) [[P0]])
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef half @llvm.sqrt.f16(half [[HLSL_DOT_I]])
|
||||
// CHECK-NEXT: ret half [[TMP0]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) half @_Z17test_length_half2Dv2_Dh(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) half @_Z17test_length_half2Dv2_Dh(
|
||||
// SPVCHECK-SAME: <2 x half> noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_LENGTH_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef half @llvm.spv.length.v2f16(<2 x half> nofpclass(nan inf) [[P0]])
|
||||
@@ -50,15 +43,14 @@ half test_length_half2(half2 p0)
|
||||
return length(p0);
|
||||
}
|
||||
|
||||
// DXCHECK-LABEL: define noundef nofpclass(nan inf) half @_Z17test_length_half3Dv3_Dh(
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) half @_Z17test_length_half3Dv3_Dh(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) half @_Z17test_length_half3Dv3_Dh(
|
||||
// CHECK-SAME: <3 x half> noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_DOT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn half @llvm.dx.fdot.v3f16(<3 x half> nofpclass(nan inf) [[P0]], <3 x half> nofpclass(nan inf) [[P0]])
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef half @llvm.sqrt.f16(half [[HLSL_DOT_I]])
|
||||
// CHECK-NEXT: ret half [[TMP0]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) half @_Z17test_length_half3Dv3_Dh(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) half @_Z17test_length_half3Dv3_Dh(
|
||||
// SPVCHECK-SAME: <3 x half> noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_LENGTH_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef half @llvm.spv.length.v3f16(<3 x half> nofpclass(nan inf) [[P0]])
|
||||
@@ -69,15 +61,14 @@ half test_length_half3(half3 p0)
|
||||
return length(p0);
|
||||
}
|
||||
|
||||
// DXCHECK-LABEL: define noundef nofpclass(nan inf) half @_Z17test_length_half4Dv4_Dh(
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) half @_Z17test_length_half4Dv4_Dh(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) half @_Z17test_length_half4Dv4_Dh(
|
||||
// CHECK-SAME: <4 x half> noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_DOT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn half @llvm.dx.fdot.v4f16(<4 x half> nofpclass(nan inf) [[P0]], <4 x half> nofpclass(nan inf) [[P0]])
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef half @llvm.sqrt.f16(half [[HLSL_DOT_I]])
|
||||
// CHECK-NEXT: ret half [[TMP0]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) half @_Z17test_length_half4Dv4_Dh(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) half @_Z17test_length_half4Dv4_Dh(
|
||||
// SPVCHECK-SAME: <4 x half> noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_LENGTH_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef half @llvm.spv.length.v4f16(<4 x half> nofpclass(nan inf) [[P0]])
|
||||
@@ -88,14 +79,13 @@ half test_length_half4(half4 p0)
|
||||
return length(p0);
|
||||
}
|
||||
|
||||
// DXCHECK-LABEL: define noundef nofpclass(nan inf) float @_Z17test_length_floatf(
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z17test_length_floatf(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z17test_length_floatf(
|
||||
// CHECK-SAME: float noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[ELT_ABS_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef float @llvm.fabs.f32(float nofpclass(nan inf) [[P0]])
|
||||
// CHECK-NEXT: ret float [[ELT_ABS_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) float @_Z17test_length_floatf(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) float @_Z17test_length_floatf(
|
||||
// SPVCHECK-SAME: float noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[ELT_ABS_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef float @llvm.fabs.f32(float nofpclass(nan inf) [[P0]])
|
||||
@@ -106,15 +96,14 @@ float test_length_float(float p0)
|
||||
return length(p0);
|
||||
}
|
||||
|
||||
// DXCHECK-LABEL: define noundef nofpclass(nan inf) float @_Z18test_length_float2Dv2_f(
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z18test_length_float2Dv2_f(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z18test_length_float2Dv2_f(
|
||||
// CHECK-SAME: <2 x float> noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_DOT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn float @llvm.dx.fdot.v2f32(<2 x float> nofpclass(nan inf) [[P0]], <2 x float> nofpclass(nan inf) [[P0]])
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef float @llvm.sqrt.f32(float [[HLSL_DOT_I]])
|
||||
// CHECK-NEXT: ret float [[TMP0]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) float @_Z18test_length_float2Dv2_f(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) float @_Z18test_length_float2Dv2_f(
|
||||
// SPVCHECK-SAME: <2 x float> noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_LENGTH_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef float @llvm.spv.length.v2f32(<2 x float> nofpclass(nan inf) [[P0]])
|
||||
@@ -125,15 +114,14 @@ float test_length_float2(float2 p0)
|
||||
return length(p0);
|
||||
}
|
||||
|
||||
// DXCHECK-LABEL: define noundef nofpclass(nan inf) float @_Z18test_length_float3Dv3_f(
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z18test_length_float3Dv3_f(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z18test_length_float3Dv3_f(
|
||||
// CHECK-SAME: <3 x float> noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_DOT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn float @llvm.dx.fdot.v3f32(<3 x float> nofpclass(nan inf) [[P0]], <3 x float> nofpclass(nan inf) [[P0]])
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef float @llvm.sqrt.f32(float [[HLSL_DOT_I]])
|
||||
// CHECK-NEXT: ret float [[TMP0]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) float @_Z18test_length_float3Dv3_f(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) float @_Z18test_length_float3Dv3_f(
|
||||
// SPVCHECK-SAME: <3 x float> noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_LENGTH_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef float @llvm.spv.length.v3f32(<3 x float> nofpclass(nan inf) [[P0]])
|
||||
@@ -144,15 +132,14 @@ float test_length_float3(float3 p0)
|
||||
return length(p0);
|
||||
}
|
||||
|
||||
// DXCHECK-LABEL: define noundef nofpclass(nan inf) float @_Z18test_length_float4Dv4_f(
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z18test_length_float4Dv4_f(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z18test_length_float4Dv4_f(
|
||||
// CHECK-SAME: <4 x float> noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_DOT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn float @llvm.dx.fdot.v4f32(<4 x float> nofpclass(nan inf) [[P0]], <4 x float> nofpclass(nan inf) [[P0]])
|
||||
// CHECK-NEXT: [[TMP0:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef float @llvm.sqrt.f32(float [[HLSL_DOT_I]])
|
||||
// CHECK-NEXT: ret float [[TMP0]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) float @_Z18test_length_float4Dv4_f(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) float @_Z18test_length_float4Dv4_f(
|
||||
// SPVCHECK-SAME: <4 x float> noundef nofpclass(nan inf) [[P0:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_LENGTH_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef float @llvm.spv.length.v4f32(<4 x float> nofpclass(nan inf) [[P0]])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NATIVE_HALF -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple spirv-unknown-vulkan-compute %s -fnative-half-type -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NATIVE_HALF -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple spirv-unknown-vulkan-compute %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NATIVE_HALF -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple spirv-unknown-vulkan-compute %s -fnative-half-type -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NATIVE_HALF -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple spirv-unknown-vulkan-compute %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
|
||||
// CHECK: define [[FNATTRS]] float @_Z16test_lerp_doubled(
|
||||
// CHECK: [[CONV0:%.*]] = fptrunc {{.*}} double %{{.*}} to float
|
||||
|
||||
@@ -2,67 +2,67 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log_double
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log.f32(
|
||||
float test_log_double(double p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log_double2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log.v2f32
|
||||
float2 test_log_double2(double2 p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log_double3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log.v3f32
|
||||
float3 test_log_double3(double3 p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log_double4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log.v4f32
|
||||
float4 test_log_double4(double4 p0) { return log(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log_int
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log_int
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log.f32(
|
||||
float test_log_int(int p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log_int2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log_int2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log.v2f32
|
||||
float2 test_log_int2(int2 p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log_int3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log_int3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log.v3f32
|
||||
float3 test_log_int3(int3 p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log_int4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log_int4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log.v4f32
|
||||
float4 test_log_int4(int4 p0) { return log(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log_uint
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log_uint
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log.f32(
|
||||
float test_log_uint(uint p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log_uint2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log_uint2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log.v2f32
|
||||
float2 test_log_uint2(uint2 p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log_uint3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log_uint3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log.v3f32
|
||||
float3 test_log_uint3(uint3 p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log_uint4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log_uint4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log.v4f32
|
||||
float4 test_log_uint4(uint4 p0) { return log(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log_int64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log_int64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log.f32(
|
||||
float test_log_int64_t(int64_t p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log_int64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log_int64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log.v2f32
|
||||
float2 test_log_int64_t2(int64_t2 p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log_int64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log_int64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log.v3f32
|
||||
float3 test_log_int64_t3(int64_t3 p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log_int64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log_int64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log.v4f32
|
||||
float4 test_log_int64_t4(int64_t4 p0) { return log(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log_uint64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log_uint64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log.f32(
|
||||
float test_log_uint64_t(uint64_t p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log_uint64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log_uint64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log.v2f32
|
||||
float2 test_log_uint64_t2(uint64_t2 p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log_uint64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log_uint64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log.v3f32
|
||||
float3 test_log_uint64_t3(uint64_t3 p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log_uint64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log_uint64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log.v4f32
|
||||
float4 test_log_uint64_t4(uint64_t4 p0) { return log(p0); }
|
||||
|
||||
@@ -5,36 +5,36 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z13test_log_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z13test_log_half
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.log.f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z13test_log_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z13test_log_half
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.log.f32(
|
||||
half test_log_half(half p0) { return log(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z14test_log_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z14test_log_half2
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.log.v2f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z14test_log_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z14test_log_half2
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log.v2f32(
|
||||
half2 test_log_half2(half2 p0) { return log(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z14test_log_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z14test_log_half3
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.log.v3f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z14test_log_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z14test_log_half3
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log.v3f32(
|
||||
half3 test_log_half3(half3 p0) { return log(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z14test_log_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z14test_log_half4
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.log.v4f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z14test_log_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z14test_log_half4
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log.v4f32(
|
||||
half4 test_log_half4(half4 p0) { return log(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z14test_log_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_log_float
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log.f32(
|
||||
float test_log_float(float p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z15test_log_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_log_float2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log.v2f32
|
||||
float2 test_log_float2(float2 p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z15test_log_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_log_float3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log.v3f32
|
||||
float3 test_log_float3(float3 p0) { return log(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z15test_log_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_log_float4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log.v4f32
|
||||
float4 test_log_float4(float4 p0) { return log(p0); }
|
||||
|
||||
@@ -2,67 +2,67 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log10_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log10_double
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log10.f32(
|
||||
float test_log10_double(double p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log10_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log10_double2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log10.v2f32
|
||||
float2 test_log10_double2(double2 p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log10_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log10_double3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log10.v3f32
|
||||
float3 test_log10_double3(double3 p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log10_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log10_double4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log10.v4f32
|
||||
float4 test_log10_double4(double4 p0) { return log10(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log10_int
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log10_int
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log10.f32(
|
||||
float test_log10_int(int p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log10_int2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log10_int2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log10.v2f32
|
||||
float2 test_log10_int2(int2 p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log10_int3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log10_int3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log10.v3f32
|
||||
float3 test_log10_int3(int3 p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log10_int4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log10_int4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log10.v4f32
|
||||
float4 test_log10_int4(int4 p0) { return log10(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log10_uint
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log10_uint
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log10.f32(
|
||||
float test_log10_uint(uint p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log10_uint2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log10_uint2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log10.v2f32
|
||||
float2 test_log10_uint2(uint2 p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log10_uint3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log10_uint3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log10.v3f32
|
||||
float3 test_log10_uint3(uint3 p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log10_uint4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log10_uint4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log10.v4f32
|
||||
float4 test_log10_uint4(uint4 p0) { return log10(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log10_int64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log10_int64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log10.f32(
|
||||
float test_log10_int64_t(int64_t p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log10_int64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log10_int64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log10.v2f32
|
||||
float2 test_log10_int64_t2(int64_t2 p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log10_int64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log10_int64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log10.v3f32
|
||||
float3 test_log10_int64_t3(int64_t3 p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log10_int64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log10_int64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log10.v4f32
|
||||
float4 test_log10_int64_t4(int64_t4 p0) { return log10(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log10_uint64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log10_uint64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log10.f32(
|
||||
float test_log10_uint64_t(uint64_t p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log10_uint64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log10_uint64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log10.v2f32
|
||||
float2 test_log10_uint64_t2(uint64_t2 p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log10_uint64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log10_uint64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log10.v3f32
|
||||
float3 test_log10_uint64_t3(uint64_t3 p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log10_uint64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log10_uint64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log10.v4f32
|
||||
float4 test_log10_uint64_t4(uint64_t4 p0) { return log10(p0); }
|
||||
|
||||
@@ -5,36 +5,36 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z15test_log10_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z15test_log10_half
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.log10.f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z15test_log10_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z15test_log10_half
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.log10.f32(
|
||||
half test_log10_half(half p0) { return log10(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z16test_log10_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z16test_log10_half2
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.log10.v2f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z16test_log10_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z16test_log10_half2
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log10.v2f32(
|
||||
half2 test_log10_half2(half2 p0) { return log10(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z16test_log10_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z16test_log10_half3
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.log10.v3f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z16test_log10_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z16test_log10_half3
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log10.v3f32(
|
||||
half3 test_log10_half3(half3 p0) { return log10(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z16test_log10_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z16test_log10_half4
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.log10.v4f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z16test_log10_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z16test_log10_half4
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log10.v4f32(
|
||||
half4 test_log10_half4(half4 p0) { return log10(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z16test_log10_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z16test_log10_float
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log10.f32(
|
||||
float test_log10_float(float p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z17test_log10_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z17test_log10_float2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log10.v2f32
|
||||
float2 test_log10_float2(float2 p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z17test_log10_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z17test_log10_float3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log10.v3f32
|
||||
float3 test_log10_float3(float3 p0) { return log10(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z17test_log10_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z17test_log10_float4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log10.v4f32
|
||||
float4 test_log10_float4(float4 p0) { return log10(p0); }
|
||||
|
||||
@@ -2,67 +2,67 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log2_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log2_double
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log2.f32(
|
||||
float test_log2_double(double p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log2_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log2_double2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log2.v2f32
|
||||
float2 test_log2_double2(double2 p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log2_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log2_double3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log2.v3f32
|
||||
float3 test_log2_double3(double3 p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log2_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log2_double4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log2.v4f32
|
||||
float4 test_log2_double4(double4 p0) { return log2(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log2_int
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log2_int
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log2.f32(
|
||||
float test_log2_int(int p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log2_int2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log2_int2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log2.v2f32
|
||||
float2 test_log2_int2(int2 p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log2_int3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log2_int3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log2.v3f32
|
||||
float3 test_log2_int3(int3 p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log2_int4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log2_int4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log2.v4f32
|
||||
float4 test_log2_int4(int4 p0) { return log2(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log2_uint
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log2_uint
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log2.f32(
|
||||
float test_log2_uint(uint p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log2_uint2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log2_uint2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log2.v2f32
|
||||
float2 test_log2_uint2(uint2 p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log2_uint3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log2_uint3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log2.v3f32
|
||||
float3 test_log2_uint3(uint3 p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log2_uint4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log2_uint4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log2.v4f32
|
||||
float4 test_log2_uint4(uint4 p0) { return log2(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log2_int64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log2_int64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log2.f32(
|
||||
float test_log2_int64_t(int64_t p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log2_int64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log2_int64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log2.v2f32
|
||||
float2 test_log2_int64_t2(int64_t2 p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log2_int64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log2_int64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log2.v3f32
|
||||
float3 test_log2_int64_t3(int64_t3 p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log2_int64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log2_int64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log2.v4f32
|
||||
float4 test_log2_int64_t4(int64_t4 p0) { return log2(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_log2_uint64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_log2_uint64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log2.f32(
|
||||
float test_log2_uint64_t(uint64_t p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_log2_uint64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_log2_uint64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log2.v2f32
|
||||
float2 test_log2_uint64_t2(uint64_t2 p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_log2_uint64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_log2_uint64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log2.v3f32
|
||||
float3 test_log2_uint64_t3(uint64_t3 p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_log2_uint64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_log2_uint64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log2.v4f32
|
||||
float4 test_log2_uint64_t4(uint64_t4 p0) { return log2(p0); }
|
||||
|
||||
@@ -5,36 +5,36 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z14test_log2_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z14test_log2_half
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.log2.f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z14test_log2_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_log2_half
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.log2.f32(
|
||||
half test_log2_half(half p0) { return log2(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z15test_log2_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z15test_log2_half2
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.log2.v2f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z15test_log2_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_log2_half2
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log2.v2f32(
|
||||
half2 test_log2_half2(half2 p0) { return log2(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z15test_log2_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z15test_log2_half3
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.log2.v3f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z15test_log2_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_log2_half3
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log2.v3f32(
|
||||
half3 test_log2_half3(half3 p0) { return log2(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z15test_log2_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z15test_log2_half4
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.log2.v4f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z15test_log2_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_log2_half4
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log2.v4f32(
|
||||
half4 test_log2_half4(half4 p0) { return log2(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z15test_log2_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z15test_log2_float
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log2.f32(
|
||||
float test_log2_float(float p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z16test_log2_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z16test_log2_float2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log2.v2f32
|
||||
float2 test_log2_float2(float2 p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z16test_log2_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z16test_log2_float3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log2.v3f32
|
||||
float3 test_log2_float3(float3 p0) { return log2(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z16test_log2_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z16test_log2_float4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log2.v4f32
|
||||
float4 test_log2_float4(float4 p0) { return log2(p0); }
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
// RUN: -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
#ifdef __HLSL_ENABLE_16_BIT
|
||||
// NATIVE_HALF-LABEL: define noundef <4 x i16> {{.*}}test_max_short4_mismatch
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <4 x i16> {{.*}}test_max_short4_mismatch
|
||||
// NATIVE_HALF: [[CONV0:%.*]] = insertelement <4 x i16> poison, i16 %{{.*}}, i64 0
|
||||
// NATIVE_HALF: [[CONV1:%.*]] = shufflevector <4 x i16> [[CONV0]], <4 x i16> poison, <4 x i32> zeroinitializer
|
||||
// NATIVE_HALF: [[MAX:%.*]] = call noundef <4 x i16> @llvm.smax.v4i16(<4 x i16> %{{.*}}, <4 x i16> [[CONV1]])
|
||||
// NATIVE_HALF: ret <4 x i16> [[MAX]]
|
||||
int16_t4 test_max_short4_mismatch(int16_t4 p0, int16_t p1) { return max(p0, p1); }
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef <4 x i16> {{.*}}test_max_ushort4_mismatch
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <4 x i16> {{.*}}test_max_ushort4_mismatch
|
||||
// NATIVE_HALF: [[CONV0:%.*]] = insertelement <4 x i16> poison, i16 %{{.*}}, i64 0
|
||||
// NATIVE_HALF: [[CONV1:%.*]] = shufflevector <4 x i16> [[CONV0]], <4 x i16> poison, <4 x i32> zeroinitializer
|
||||
// NATIVE_HALF: [[MAX:%.*]] = call noundef <4 x i16> @llvm.umax.v4i16(<4 x i16> %{{.*}}, <4 x i16> [[CONV1]])
|
||||
@@ -19,61 +19,61 @@ int16_t4 test_max_short4_mismatch(int16_t4 p0, int16_t p1) { return max(p0, p1);
|
||||
uint16_t4 test_max_ushort4_mismatch(uint16_t4 p0, uint16_t p1) { return max(p0, p1); }
|
||||
#endif
|
||||
|
||||
// CHECK-LABEL: define noundef <4 x i32> {{.*}}test_max_int4_mismatch
|
||||
// CHECK-LABEL: define hidden noundef <4 x i32> {{.*}}test_max_int4_mismatch
|
||||
// CHECK: [[CONV0:%.*]] = insertelement <4 x i32> poison, i32 %{{.*}}, i64 0
|
||||
// CHECK: [[CONV1:%.*]] = shufflevector <4 x i32> [[CONV0]], <4 x i32> poison, <4 x i32> zeroinitializer
|
||||
// CHECK: [[MAX:%.*]] = call noundef <4 x i32> @llvm.smax.v4i32(<4 x i32> %{{.*}}, <4 x i32> [[CONV1]])
|
||||
// CHECK: ret <4 x i32> [[MAX]]
|
||||
int4 test_max_int4_mismatch(int4 p0, int p1) { return max(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef <4 x i32> {{.*}}test_max_uint4_mismatch
|
||||
// CHECK-LABEL: define hidden noundef <4 x i32> {{.*}}test_max_uint4_mismatch
|
||||
// CHECK: [[CONV0:%.*]] = insertelement <4 x i32> poison, i32 %{{.*}}, i64 0
|
||||
// CHECK: [[CONV1:%.*]] = shufflevector <4 x i32> [[CONV0]], <4 x i32> poison, <4 x i32> zeroinitializer
|
||||
// CHECK: [[MAX:%.*]] = call noundef <4 x i32> @llvm.umax.v4i32(<4 x i32> %{{.*}}, <4 x i32> [[CONV1]])
|
||||
// CHECK: ret <4 x i32> [[MAX]]
|
||||
uint4 test_max_uint4_mismatch(uint4 p0, uint p1) { return max(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef <4 x i64> {{.*}}test_max_long4_mismatch
|
||||
// CHECK-LABEL: define hidden noundef <4 x i64> {{.*}}test_max_long4_mismatch
|
||||
// CHECK: [[CONV0:%.*]] = insertelement <4 x i64> poison, i64 %{{.*}}, i64 0
|
||||
// CHECK: [[CONV1:%.*]] = shufflevector <4 x i64> [[CONV0]], <4 x i64> poison, <4 x i32> zeroinitializer
|
||||
// CHECK: [[MAX:%.*]] = call noundef <4 x i64> @llvm.smax.v4i64(<4 x i64> %{{.*}}, <4 x i64> [[CONV1]])
|
||||
// CHECK: ret <4 x i64> [[MAX]]
|
||||
int64_t4 test_max_long4_mismatch(int64_t4 p0, int64_t p1) { return max(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef <4 x i64> {{.*}}test_max_ulong4_mismatch
|
||||
// CHECK-LABEL: define hidden noundef <4 x i64> {{.*}}test_max_ulong4_mismatch
|
||||
// CHECK: [[CONV0:%.*]] = insertelement <4 x i64> poison, i64 %{{.*}}, i64 0
|
||||
// CHECK: [[CONV1:%.*]] = shufflevector <4 x i64> [[CONV0]], <4 x i64> poison, <4 x i32> zeroinitializer
|
||||
// CHECK: [[MAX:%.*]] = call noundef <4 x i64> @llvm.umax.v4i64(<4 x i64> %{{.*}}, <4 x i64> [[CONV1]])
|
||||
// CHECK: ret <4 x i64> [[MAX]]
|
||||
uint64_t4 test_max_ulong4_mismatch(uint64_t4 p0, uint64_t p1) { return max(p0, p1); }
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> {{.*}}test_max_half4_mismatch
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> {{.*}}test_max_half4_mismatch
|
||||
// NATIVE_HALF: [[CONV0:%.*]] = insertelement <4 x half> poison, half %{{.*}}, i64 0
|
||||
// NATIVE_HALF: [[CONV1:%.*]] = shufflevector <4 x half> [[CONV0]], <4 x half> poison, <4 x i32> zeroinitializer
|
||||
// NATIVE_HALF: [[MAX:%.*]] = call reassoc nnan ninf nsz arcp afn noundef <4 x half> @llvm.maxnum.v4f16(<4 x half> %{{.*}}, <4 x half> [[CONV1]])
|
||||
// NATIVE_HALF: ret <4 x half> [[MAX]]
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_max_half4_mismatch
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_max_half4_mismatch
|
||||
// NO_HALF: [[CONV0:%.*]] = insertelement <4 x float> poison, float %{{.*}}, i64 0
|
||||
// NO_HALF: [[CONV1:%.*]] = shufflevector <4 x float> [[CONV0]], <4 x float> poison, <4 x i32> zeroinitializer
|
||||
// NO_HALF: [[MAX:%.*]] = call reassoc nnan ninf nsz arcp afn noundef <4 x float> @llvm.maxnum.v4f32(<4 x float> %{{.*}}, <4 x float> [[CONV1]])
|
||||
// NO_HALF: ret <4 x float> [[MAX]]
|
||||
half4 test_max_half4_mismatch(half4 p0, half p1) { return max(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_max_float4_mismatch
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_max_float4_mismatch
|
||||
// CHECK: [[CONV0:%.*]] = insertelement <4 x float> poison, float %{{.*}}, i64 0
|
||||
// CHECK: [[CONV1:%.*]] = shufflevector <4 x float> [[CONV0]], <4 x float> poison, <4 x i32> zeroinitializer
|
||||
// CHECK: [[MAX:%.*]] = call reassoc nnan ninf nsz arcp afn noundef <4 x float> @llvm.maxnum.v4f32(<4 x float> %{{.*}}, <4 x float> [[CONV1]])
|
||||
// CHECK: ret <4 x float> [[MAX]]
|
||||
float4 test_max_float4_mismatch(float4 p0, float p1) { return max(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x double> {{.*}}test_max_double4_mismatch
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x double> {{.*}}test_max_double4_mismatch
|
||||
// CHECK: [[CONV0:%.*]] = insertelement <4 x double> poison, double %{{.*}}, i64 0
|
||||
// CHECK: [[CONV1:%.*]] = shufflevector <4 x double> [[CONV0]], <4 x double> poison, <4 x i32> zeroinitializer
|
||||
// CHECK: [[MAX:%.*]] = call reassoc nnan ninf nsz arcp afn noundef <4 x double> @llvm.maxnum.v4f64(<4 x double> %{{.*}}, <4 x double> [[CONV1]])
|
||||
// CHECK: ret <4 x double> [[MAX]]
|
||||
double4 test_max_double4_mismatch(double4 p0, double p1) { return max(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x double> {{.*}}test_max_double4_mismatch2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x double> {{.*}}test_max_double4_mismatch2
|
||||
// CHECK: [[CONV0:%.*]] = insertelement <4 x double> poison, double %{{.*}}, i64 0
|
||||
// CHECK: [[CONV1:%.*]] = shufflevector <4 x double> [[CONV0]], <4 x double> poison, <4 x i32> zeroinitializer
|
||||
// CHECK: [[MAX:%.*]] = call reassoc nnan ninf nsz arcp afn noundef <4 x double> @llvm.maxnum.v4f64(<4 x double> [[CONV1]], <4 x double> %{{.*}})
|
||||
|
||||
@@ -6,128 +6,128 @@
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
#ifdef __HLSL_ENABLE_16_BIT
|
||||
// NATIVE_HALF-LABEL: define noundef i16 @_Z14test_max_short
|
||||
// NATIVE_HALF-LABEL: define hidden noundef i16 @_Z14test_max_short
|
||||
// NATIVE_HALF: call i16 @llvm.smax.i16(
|
||||
int16_t test_max_short(int16_t p0, int16_t p1) { return max(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef <2 x i16> @_Z15test_max_short2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <2 x i16> @_Z15test_max_short2
|
||||
// NATIVE_HALF: call <2 x i16> @llvm.smax.v2i16(
|
||||
int16_t2 test_max_short2(int16_t2 p0, int16_t2 p1) { return max(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef <3 x i16> @_Z15test_max_short3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <3 x i16> @_Z15test_max_short3
|
||||
// NATIVE_HALF: call <3 x i16> @llvm.smax.v3i16
|
||||
int16_t3 test_max_short3(int16_t3 p0, int16_t3 p1) { return max(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef <4 x i16> @_Z15test_max_short4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <4 x i16> @_Z15test_max_short4
|
||||
// NATIVE_HALF: call <4 x i16> @llvm.smax.v4i16
|
||||
int16_t4 test_max_short4(int16_t4 p0, int16_t4 p1) { return max(p0, p1); }
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef i16 @_Z15test_max_ushort
|
||||
// NATIVE_HALF-LABEL: define hidden noundef i16 @_Z15test_max_ushort
|
||||
// NATIVE_HALF: call i16 @llvm.umax.i16(
|
||||
uint16_t test_max_ushort(uint16_t p0, uint16_t p1) { return max(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef <2 x i16> @_Z16test_max_ushort2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <2 x i16> @_Z16test_max_ushort2
|
||||
// NATIVE_HALF: call <2 x i16> @llvm.umax.v2i16
|
||||
uint16_t2 test_max_ushort2(uint16_t2 p0, uint16_t2 p1) { return max(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef <3 x i16> @_Z16test_max_ushort3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <3 x i16> @_Z16test_max_ushort3
|
||||
// NATIVE_HALF: call <3 x i16> @llvm.umax.v3i16
|
||||
uint16_t3 test_max_ushort3(uint16_t3 p0, uint16_t3 p1) { return max(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef <4 x i16> @_Z16test_max_ushort4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <4 x i16> @_Z16test_max_ushort4
|
||||
// NATIVE_HALF: call <4 x i16> @llvm.umax.v4i16
|
||||
uint16_t4 test_max_ushort4(uint16_t4 p0, uint16_t4 p1) { return max(p0, p1); }
|
||||
#endif
|
||||
|
||||
// CHECK-LABEL: define noundef i32 @_Z12test_max_int
|
||||
// CHECK-LABEL: define hidden noundef i32 @_Z12test_max_int
|
||||
// CHECK: call i32 @llvm.smax.i32(
|
||||
int test_max_int(int p0, int p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <2 x i32> @_Z13test_max_int2
|
||||
// CHECK-LABEL: define hidden noundef <2 x i32> @_Z13test_max_int2
|
||||
// CHECK: call <2 x i32> @llvm.smax.v2i32
|
||||
int2 test_max_int2(int2 p0, int2 p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <3 x i32> @_Z13test_max_int3
|
||||
// CHECK-LABEL: define hidden noundef <3 x i32> @_Z13test_max_int3
|
||||
// CHECK: call <3 x i32> @llvm.smax.v3i32
|
||||
int3 test_max_int3(int3 p0, int3 p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <4 x i32> @_Z13test_max_int4
|
||||
// CHECK-LABEL: define hidden noundef <4 x i32> @_Z13test_max_int4
|
||||
// CHECK: call <4 x i32> @llvm.smax.v4i32
|
||||
int4 test_max_int4(int4 p0, int4 p1) { return max(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef i32 @_Z13test_max_uint
|
||||
// CHECK-LABEL: define hidden noundef i32 @_Z13test_max_uint
|
||||
// CHECK: call i32 @llvm.umax.i32(
|
||||
int test_max_uint(uint p0, uint p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <2 x i32> @_Z14test_max_uint2
|
||||
// CHECK-LABEL: define hidden noundef <2 x i32> @_Z14test_max_uint2
|
||||
// CHECK: call <2 x i32> @llvm.umax.v2i32
|
||||
uint2 test_max_uint2(uint2 p0, uint2 p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <3 x i32> @_Z14test_max_uint3
|
||||
// CHECK-LABEL: define hidden noundef <3 x i32> @_Z14test_max_uint3
|
||||
// CHECK: call <3 x i32> @llvm.umax.v3i32
|
||||
uint3 test_max_uint3(uint3 p0, uint3 p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <4 x i32> @_Z14test_max_uint4
|
||||
// CHECK-LABEL: define hidden noundef <4 x i32> @_Z14test_max_uint4
|
||||
// CHECK: call <4 x i32> @llvm.umax.v4i32
|
||||
uint4 test_max_uint4(uint4 p0, uint4 p1) { return max(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef i64 @_Z13test_max_long
|
||||
// CHECK-LABEL: define hidden noundef i64 @_Z13test_max_long
|
||||
// CHECK: call i64 @llvm.smax.i64(
|
||||
int64_t test_max_long(int64_t p0, int64_t p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <2 x i64> @_Z14test_max_long2
|
||||
// CHECK-LABEL: define hidden noundef <2 x i64> @_Z14test_max_long2
|
||||
// CHECK: call <2 x i64> @llvm.smax.v2i64
|
||||
int64_t2 test_max_long2(int64_t2 p0, int64_t2 p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <3 x i64> @_Z14test_max_long3
|
||||
// CHECK-LABEL: define hidden noundef <3 x i64> @_Z14test_max_long3
|
||||
// CHECK: call <3 x i64> @llvm.smax.v3i64
|
||||
int64_t3 test_max_long3(int64_t3 p0, int64_t3 p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <4 x i64> @_Z14test_max_long4
|
||||
// CHECK-LABEL: define hidden noundef <4 x i64> @_Z14test_max_long4
|
||||
// CHECK: call <4 x i64> @llvm.smax.v4i64
|
||||
int64_t4 test_max_long4(int64_t4 p0, int64_t4 p1) { return max(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef i64 @_Z14test_max_ulong
|
||||
// CHECK-LABEL: define hidden noundef i64 @_Z14test_max_ulong
|
||||
// CHECK: call i64 @llvm.umax.i64(
|
||||
uint64_t test_max_ulong(uint64_t p0, uint64_t p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <2 x i64> @_Z15test_max_ulong2
|
||||
// CHECK-LABEL: define hidden noundef <2 x i64> @_Z15test_max_ulong2
|
||||
// CHECK: call <2 x i64> @llvm.umax.v2i64
|
||||
uint64_t2 test_max_ulong2(uint64_t2 p0, uint64_t2 p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <3 x i64> @_Z15test_max_ulong3
|
||||
// CHECK-LABEL: define hidden noundef <3 x i64> @_Z15test_max_ulong3
|
||||
// CHECK: call <3 x i64> @llvm.umax.v3i64
|
||||
uint64_t3 test_max_ulong3(uint64_t3 p0, uint64_t3 p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <4 x i64> @_Z15test_max_ulong4
|
||||
// CHECK-LABEL: define hidden noundef <4 x i64> @_Z15test_max_ulong4
|
||||
// CHECK: call <4 x i64> @llvm.umax.v4i64
|
||||
uint64_t4 test_max_ulong4(uint64_t4 p0, uint64_t4 p1) { return max(p0, p1); }
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z13test_max_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z13test_max_half
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.maxnum.f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z13test_max_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z13test_max_half
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.maxnum.f32(
|
||||
half test_max_half(half p0, half p1) { return max(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z14test_max_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z14test_max_half2
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.maxnum.v2f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z14test_max_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z14test_max_half2
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.maxnum.v2f32(
|
||||
half2 test_max_half2(half2 p0, half2 p1) { return max(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z14test_max_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z14test_max_half3
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.maxnum.v3f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z14test_max_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z14test_max_half3
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.maxnum.v3f32(
|
||||
half3 test_max_half3(half3 p0, half3 p1) { return max(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z14test_max_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z14test_max_half4
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.maxnum.v4f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z14test_max_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z14test_max_half4
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.maxnum.v4f32(
|
||||
half4 test_max_half4(half4 p0, half4 p1) { return max(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z14test_max_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_max_float
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.maxnum.f32(
|
||||
float test_max_float(float p0, float p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z15test_max_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_max_float2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.maxnum.v2f32
|
||||
float2 test_max_float2(float2 p0, float2 p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z15test_max_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_max_float3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.maxnum.v3f32
|
||||
float3 test_max_float3(float3 p0, float3 p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z15test_max_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_max_float4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.maxnum.v4f32
|
||||
float4 test_max_float4(float4 p0, float4 p1) { return max(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) double @_Z15test_max_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) double @_Z15test_max_double
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn double @llvm.maxnum.f64(
|
||||
double test_max_double(double p0, double p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x double> @_Z16test_max_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x double> @_Z16test_max_double2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x double> @llvm.maxnum.v2f64
|
||||
double2 test_max_double2(double2 p0, double2 p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x double> @_Z16test_max_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x double> @_Z16test_max_double3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x double> @llvm.maxnum.v3f64
|
||||
double3 test_max_double3(double3 p0, double3 p1) { return max(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x double> @_Z16test_max_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x double> @_Z16test_max_double4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x double> @llvm.maxnum.v4f64
|
||||
double4 test_max_double4(double4 p0, double4 p1) { return max(p0, p1); }
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
// RUN: -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
#ifdef __HLSL_ENABLE_16_BIT
|
||||
// NATIVE_HALF-LABEL: define noundef <4 x i16> {{.*}}test_min_short4_mismatch
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <4 x i16> {{.*}}test_min_short4_mismatch
|
||||
// NATIVE_HALF: [[CONV0:%.*]] = insertelement <4 x i16> poison, i16 %{{.*}}, i64 0
|
||||
// NATIVE_HALF: [[CONV1:%.*]] = shufflevector <4 x i16> [[CONV0]], <4 x i16> poison, <4 x i32> zeroinitializer
|
||||
// NATIVE_HALF: [[MIN:%.*]] = call noundef <4 x i16> @llvm.smin.v4i16(<4 x i16> %{{.*}}, <4 x i16> [[CONV1]])
|
||||
// NATIVE_HALF: ret <4 x i16> [[MIN]]
|
||||
int16_t4 test_min_short4_mismatch(int16_t4 p0, int16_t p1) { return min(p0, p1); }
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef <4 x i16> {{.*}}test_min_ushort4_mismatch
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <4 x i16> {{.*}}test_min_ushort4_mismatch
|
||||
// NATIVE_HALF: [[CONV0:%.*]] = insertelement <4 x i16> poison, i16 %{{.*}}, i64 0
|
||||
// NATIVE_HALF: [[CONV1:%.*]] = shufflevector <4 x i16> [[CONV0]], <4 x i16> poison, <4 x i32> zeroinitializer
|
||||
// NATIVE_HALF: [[MIN:%.*]] = call noundef <4 x i16> @llvm.umin.v4i16(<4 x i16> %{{.*}}, <4 x i16> [[CONV1]])
|
||||
@@ -19,61 +19,61 @@ int16_t4 test_min_short4_mismatch(int16_t4 p0, int16_t p1) { return min(p0, p1);
|
||||
uint16_t4 test_min_ushort4_mismatch(uint16_t4 p0, uint16_t p1) { return min(p0, p1); }
|
||||
#endif
|
||||
|
||||
// CHECK-LABEL: define noundef <4 x i32> {{.*}}test_min_int4_mismatch
|
||||
// CHECK-LABEL: define hidden noundef <4 x i32> {{.*}}test_min_int4_mismatch
|
||||
// CHECK: [[CONV0:%.*]] = insertelement <4 x i32> poison, i32 %{{.*}}, i64 0
|
||||
// CHECK: [[CONV1:%.*]] = shufflevector <4 x i32> [[CONV0]], <4 x i32> poison, <4 x i32> zeroinitializer
|
||||
// CHECK: [[MIN:%.*]] = call noundef <4 x i32> @llvm.smin.v4i32(<4 x i32> %{{.*}}, <4 x i32> [[CONV1]])
|
||||
// CHECK: ret <4 x i32> [[MIN]]
|
||||
int4 test_min_int4_mismatch(int4 p0, int p1) { return min(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef <4 x i32> {{.*}}test_min_uint4_mismatch
|
||||
// CHECK-LABEL: define hidden noundef <4 x i32> {{.*}}test_min_uint4_mismatch
|
||||
// CHECK: [[CONV0:%.*]] = insertelement <4 x i32> poison, i32 %{{.*}}, i64 0
|
||||
// CHECK: [[CONV1:%.*]] = shufflevector <4 x i32> [[CONV0]], <4 x i32> poison, <4 x i32> zeroinitializer
|
||||
// CHECK: [[MIN:%.*]] = call noundef <4 x i32> @llvm.umin.v4i32(<4 x i32> %{{.*}}, <4 x i32> [[CONV1]])
|
||||
// CHECK: ret <4 x i32> [[MIN]]
|
||||
uint4 test_min_uint4_mismatch(uint4 p0, uint p1) { return min(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef <4 x i64> {{.*}}test_min_long4_mismatch
|
||||
// CHECK-LABEL: define hidden noundef <4 x i64> {{.*}}test_min_long4_mismatch
|
||||
// CHECK: [[CONV0:%.*]] = insertelement <4 x i64> poison, i64 %{{.*}}, i64 0
|
||||
// CHECK: [[CONV1:%.*]] = shufflevector <4 x i64> [[CONV0]], <4 x i64> poison, <4 x i32> zeroinitializer
|
||||
// CHECK: [[MIN:%.*]] = call noundef <4 x i64> @llvm.smin.v4i64(<4 x i64> %{{.*}}, <4 x i64> [[CONV1]])
|
||||
// CHECK: ret <4 x i64> [[MIN]]
|
||||
int64_t4 test_min_long4_mismatch(int64_t4 p0, int64_t p1) { return min(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef <4 x i64> {{.*}}test_min_ulong4_mismatch
|
||||
// CHECK-LABEL: define hidden noundef <4 x i64> {{.*}}test_min_ulong4_mismatch
|
||||
// CHECK: [[CONV0:%.*]] = insertelement <4 x i64> poison, i64 %{{.*}}, i64 0
|
||||
// CHECK: [[CONV1:%.*]] = shufflevector <4 x i64> [[CONV0]], <4 x i64> poison, <4 x i32> zeroinitializer
|
||||
// CHECK: [[MIN:%.*]] = call noundef <4 x i64> @llvm.umin.v4i64(<4 x i64> %{{.*}}, <4 x i64> [[CONV1]])
|
||||
// CHECK: ret <4 x i64> [[MIN]]
|
||||
uint64_t4 test_min_ulong4_mismatch(uint64_t4 p0, uint64_t p1) { return min(p0, p1); }
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> {{.*}}test_min_half4_mismatch
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> {{.*}}test_min_half4_mismatch
|
||||
// NATIVE_HALF: [[CONV0:%.*]] = insertelement <4 x half> poison, half %{{.*}}, i64 0
|
||||
// NATIVE_HALF: [[CONV1:%.*]] = shufflevector <4 x half> [[CONV0]], <4 x half> poison, <4 x i32> zeroinitializer
|
||||
// NATIVE_HALF: [[MIN:%.*]] = call reassoc nnan ninf nsz arcp afn noundef <4 x half> @llvm.minnum.v4f16(<4 x half> %{{.*}}, <4 x half> [[CONV1]])
|
||||
// NATIVE_HALF: ret <4 x half> [[MIN]]
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_min_half4_mismatch
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_min_half4_mismatch
|
||||
// NO_HALF: [[CONV0:%.*]] = insertelement <4 x float> poison, float %{{.*}}, i64 0
|
||||
// NO_HALF: [[CONV1:%.*]] = shufflevector <4 x float> [[CONV0]], <4 x float> poison, <4 x i32> zeroinitializer
|
||||
// NO_HALF: [[MIN:%.*]] = call reassoc nnan ninf nsz arcp afn noundef <4 x float> @llvm.minnum.v4f32(<4 x float> %{{.*}}, <4 x float> [[CONV1]])
|
||||
// NO_HALF: ret <4 x float> [[MIN]]
|
||||
half4 test_min_half4_mismatch(half4 p0, half p1) { return min(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_min_float4_mismatch
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_min_float4_mismatch
|
||||
// CHECK: [[CONV0:%.*]] = insertelement <4 x float> poison, float %{{.*}}, i64 0
|
||||
// CHECK: [[CONV1:%.*]] = shufflevector <4 x float> [[CONV0]], <4 x float> poison, <4 x i32> zeroinitializer
|
||||
// CHECK: [[MIN:%.*]] = call reassoc nnan ninf nsz arcp afn noundef <4 x float> @llvm.minnum.v4f32(<4 x float> %{{.*}}, <4 x float> [[CONV1]])
|
||||
// CHECK: ret <4 x float> [[MIN]]
|
||||
float4 test_min_float4_mismatch(float4 p0, float p1) { return min(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x double> {{.*}}test_min_double4_mismatch
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x double> {{.*}}test_min_double4_mismatch
|
||||
// CHECK: [[CONV0:%.*]] = insertelement <4 x double> poison, double %{{.*}}, i64 0
|
||||
// CHECK: [[CONV1:%.*]] = shufflevector <4 x double> [[CONV0]], <4 x double> poison, <4 x i32> zeroinitializer
|
||||
// CHECK: [[MIN:%.*]] = call reassoc nnan ninf nsz arcp afn noundef <4 x double> @llvm.minnum.v4f64(<4 x double> %{{.*}}, <4 x double> [[CONV1]])
|
||||
// CHECK: ret <4 x double> [[MIN]]
|
||||
double4 test_min_double4_mismatch(double4 p0, double p1) { return min(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x double> {{.*}}test_min_double4_mismatch2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x double> {{.*}}test_min_double4_mismatch2
|
||||
// CHECK: [[CONV0:%.*]] = insertelement <4 x double> poison, double %{{.*}}, i64 0
|
||||
// CHECK: [[CONV1:%.*]] = shufflevector <4 x double> [[CONV0]], <4 x double> poison, <4 x i32> zeroinitializer
|
||||
// CHECK: [[MIN:%.*]] = call reassoc nnan ninf nsz arcp afn noundef <4 x double> @llvm.minnum.v4f64(<4 x double> [[CONV1]], <4 x double> %{{.*}})
|
||||
|
||||
@@ -6,131 +6,131 @@
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
#ifdef __HLSL_ENABLE_16_BIT
|
||||
// NATIVE_HALF-LABEL: define noundef i16 @_Z14test_min_short
|
||||
// NATIVE_HALF-LABEL: define hidden noundef i16 @_Z14test_min_short
|
||||
// NATIVE_HALF: call i16 @llvm.smin.i16(
|
||||
int16_t test_min_short(int16_t p0, int16_t p1) { return min(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef <2 x i16> @_Z15test_min_short2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <2 x i16> @_Z15test_min_short2
|
||||
// NATIVE_HALF: call <2 x i16> @llvm.smin.v2i16(
|
||||
int16_t2 test_min_short2(int16_t2 p0, int16_t2 p1) { return min(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef <3 x i16> @_Z15test_min_short3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <3 x i16> @_Z15test_min_short3
|
||||
// NATIVE_HALF: call <3 x i16> @llvm.smin.v3i16
|
||||
int16_t3 test_min_short3(int16_t3 p0, int16_t3 p1) { return min(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef <4 x i16> @_Z15test_min_short4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <4 x i16> @_Z15test_min_short4
|
||||
// NATIVE_HALF: call <4 x i16> @llvm.smin.v4i16
|
||||
int16_t4 test_min_short4(int16_t4 p0, int16_t4 p1) { return min(p0, p1); }
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef i16 @_Z15test_min_ushort
|
||||
// NATIVE_HALF-LABEL: define hidden noundef i16 @_Z15test_min_ushort
|
||||
// NATIVE_HALF: call i16 @llvm.umin.i16(
|
||||
uint16_t test_min_ushort(uint16_t p0, uint16_t p1) { return min(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef <2 x i16> @_Z16test_min_ushort2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <2 x i16> @_Z16test_min_ushort2
|
||||
// NATIVE_HALF: call <2 x i16> @llvm.umin.v2i16
|
||||
uint16_t2 test_min_ushort2(uint16_t2 p0, uint16_t2 p1) { return min(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef <3 x i16> @_Z16test_min_ushort3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <3 x i16> @_Z16test_min_ushort3
|
||||
// NATIVE_HALF: call <3 x i16> @llvm.umin.v3i16
|
||||
uint16_t3 test_min_ushort3(uint16_t3 p0, uint16_t3 p1) { return min(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef <4 x i16> @_Z16test_min_ushort4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef <4 x i16> @_Z16test_min_ushort4
|
||||
// NATIVE_HALF: call <4 x i16> @llvm.umin.v4i16
|
||||
uint16_t4 test_min_ushort4(uint16_t4 p0, uint16_t4 p1) { return min(p0, p1); }
|
||||
#endif
|
||||
|
||||
// CHECK-LABEL: define noundef i32 @_Z12test_min_int
|
||||
// CHECK-LABEL: define hidden noundef i32 @_Z12test_min_int
|
||||
// CHECK: call i32 @llvm.smin.i32(
|
||||
int test_min_int(int p0, int p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <2 x i32> @_Z13test_min_int2
|
||||
// CHECK-LABEL: define hidden noundef <2 x i32> @_Z13test_min_int2
|
||||
// CHECK: call <2 x i32> @llvm.smin.v2i32
|
||||
int2 test_min_int2(int2 p0, int2 p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <3 x i32> @_Z13test_min_int3
|
||||
// CHECK-LABEL: define hidden noundef <3 x i32> @_Z13test_min_int3
|
||||
// CHECK: call <3 x i32> @llvm.smin.v3i32
|
||||
int3 test_min_int3(int3 p0, int3 p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <4 x i32> @_Z13test_min_int4
|
||||
// CHECK-LABEL: define hidden noundef <4 x i32> @_Z13test_min_int4
|
||||
// CHECK: call <4 x i32> @llvm.smin.v4i32
|
||||
int4 test_min_int4(int4 p0, int4 p1) { return min(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef i32 @_Z13test_min_uint
|
||||
// CHECK-LABEL: define hidden noundef i32 @_Z13test_min_uint
|
||||
// CHECK: call i32 @llvm.umin.i32(
|
||||
int test_min_uint(uint p0, uint p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <2 x i32> @_Z14test_min_uint2
|
||||
// CHECK-LABEL: define hidden noundef <2 x i32> @_Z14test_min_uint2
|
||||
// CHECK: call <2 x i32> @llvm.umin.v2i32
|
||||
uint2 test_min_uint2(uint2 p0, uint2 p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <3 x i32> @_Z14test_min_uint3
|
||||
// CHECK-LABEL: define hidden noundef <3 x i32> @_Z14test_min_uint3
|
||||
// CHECK: call <3 x i32> @llvm.umin.v3i32
|
||||
uint3 test_min_uint3(uint3 p0, uint3 p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <4 x i32> @_Z14test_min_uint4
|
||||
// CHECK-LABEL: define hidden noundef <4 x i32> @_Z14test_min_uint4
|
||||
// CHECK: call <4 x i32> @llvm.umin.v4i32
|
||||
uint4 test_min_uint4(uint4 p0, uint4 p1) { return min(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef i64 @_Z13test_min_long
|
||||
// CHECK-LABEL: define hidden noundef i64 @_Z13test_min_long
|
||||
// CHECK: call i64 @llvm.smin.i64(
|
||||
int64_t test_min_long(int64_t p0, int64_t p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <2 x i64> @_Z14test_min_long2
|
||||
// CHECK-LABEL: define hidden noundef <2 x i64> @_Z14test_min_long2
|
||||
// CHECK: call <2 x i64> @llvm.smin.v2i64
|
||||
int64_t2 test_min_long2(int64_t2 p0, int64_t2 p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <3 x i64> @_Z14test_min_long3
|
||||
// CHECK-LABEL: define hidden noundef <3 x i64> @_Z14test_min_long3
|
||||
// CHECK: call <3 x i64> @llvm.smin.v3i64
|
||||
int64_t3 test_min_long3(int64_t3 p0, int64_t3 p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <4 x i64> @_Z14test_min_long4
|
||||
// CHECK-LABEL: define hidden noundef <4 x i64> @_Z14test_min_long4
|
||||
// CHECK: call <4 x i64> @llvm.smin.v4i64
|
||||
int64_t4 test_min_long4(int64_t4 p0, int64_t4 p1) { return min(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef i64 @_Z14test_min_ulong
|
||||
// CHECK-LABEL: define hidden noundef i64 @_Z14test_min_ulong
|
||||
// CHECK: call i64 @llvm.umin.i64(
|
||||
uint64_t test_min_ulong(uint64_t p0, uint64_t p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <2 x i64> @_Z15test_min_ulong2
|
||||
// CHECK-LABEL: define hidden noundef <2 x i64> @_Z15test_min_ulong2
|
||||
// CHECK: call <2 x i64> @llvm.umin.v2i64
|
||||
uint64_t2 test_min_ulong2(uint64_t2 p0, uint64_t2 p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <3 x i64> @_Z15test_min_ulong3
|
||||
// CHECK-LABEL: define hidden noundef <3 x i64> @_Z15test_min_ulong3
|
||||
// CHECK: call <3 x i64> @llvm.umin.v3i64
|
||||
uint64_t3 test_min_ulong3(uint64_t3 p0, uint64_t3 p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef <4 x i64> @_Z15test_min_ulong4
|
||||
// CHECK-LABEL: define hidden noundef <4 x i64> @_Z15test_min_ulong4
|
||||
// CHECK: call <4 x i64> @llvm.umin.v4i64
|
||||
uint64_t4 test_min_ulong4(uint64_t4 p0, uint64_t4 p1) { return min(p0, p1); }
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z13test_min_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z13test_min_half
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.minnum.f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z13test_min_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z13test_min_half
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.minnum.f32(
|
||||
half test_min_half(half p0, half p1) { return min(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z14test_min_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z14test_min_half2
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.minnum.v2f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z14test_min_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z14test_min_half2
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.minnum.v2f32(
|
||||
half2 test_min_half2(half2 p0, half2 p1) { return min(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z14test_min_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z14test_min_half3
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.minnum.v3f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z14test_min_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z14test_min_half3
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.minnum.v3f32(
|
||||
half3 test_min_half3(half3 p0, half3 p1) { return min(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z14test_min_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z14test_min_half4
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.minnum.v4f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z14test_min_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z14test_min_half4
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.minnum.v4f32(
|
||||
half4 test_min_half4(half4 p0, half4 p1) { return min(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z14test_min_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_min_float
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.minnum.f32(
|
||||
float test_min_float(float p0, float p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z15test_min_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_min_float2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.minnum.v2f32
|
||||
float2 test_min_float2(float2 p0, float2 p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z15test_min_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_min_float3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.minnum.v3f32
|
||||
float3 test_min_float3(float3 p0, float3 p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z15test_min_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_min_float4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.minnum.v4f32
|
||||
float4 test_min_float4(float4 p0, float4 p1) { return min(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) double @_Z15test_min_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) double @_Z15test_min_double
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn double @llvm.minnum.f64(
|
||||
double test_min_double(double p0, double p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x double> @_Z16test_min_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x double> @_Z16test_min_double2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x double> @llvm.minnum.v2f64
|
||||
double2 test_min_double2(double2 p0, double2 p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x double> @_Z16test_min_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x double> @_Z16test_min_double3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x double> @llvm.minnum.v3f64
|
||||
double3 test_min_double3(double3 p0, double3 p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x double> @_Z16test_min_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x double> @_Z16test_min_double4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x double> @llvm.minnum.v4f64
|
||||
double4 test_min_double4(double4 p0, double4 p1) { return min(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x double> {{.*}}test_min_double4_mismatch
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x double> {{.*}}test_min_double4_mismatch
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x double> @llvm.minnum.v4f64
|
||||
double4 test_min_double4_mismatch(double4 p0, double p1) { return min(p0, p1); }
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
|
||||
// CHECK: define [[FNATTRS]] float @
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.[[TARGET]].normalize.f32(float
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
|
||||
// NATIVE_HALF: define [[FNATTRS]] half @
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.[[TARGET]].normalize.f16(half
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
|
||||
|
||||
//CHECK-LABEL: define noundef i1 @_Z14test_or_scalarbb(
|
||||
//CHECK-LABEL: define hidden noundef i1 @_Z14test_or_scalarbb(
|
||||
//CHECK-SAME: i1 noundef [[X:%.*]], i1 noundef [[Y:%.*]]) #[[ATTR0:[0-9]+]] {
|
||||
//CHECK-NEXT: entry:
|
||||
//CHECK: [[HLSL_OR:%.*]] = or i1 [[A:%.*]], [[B:%.*]]
|
||||
@@ -12,7 +12,7 @@ bool test_or_scalar(bool x, bool y)
|
||||
return or(x, y);
|
||||
}
|
||||
|
||||
//CHECK-LABEL: define noundef <2 x i1> @_Z13test_or_bool2Dv2_bS_(
|
||||
//CHECK-LABEL: define hidden noundef <2 x i1> @_Z13test_or_bool2Dv2_bS_(
|
||||
//CHECK-SAME: <2 x i1> noundef [[X:%.*]], <2 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
|
||||
//CHECK-NEXT: entry:
|
||||
//CHECK: [[HLSL_OR:%.*]] = or <2 x i1> [[A:%.*]], [[B:%.*]]
|
||||
@@ -22,7 +22,7 @@ bool2 test_or_bool2(bool2 x, bool2 y)
|
||||
return or(x, y);
|
||||
}
|
||||
|
||||
//CHECK-LABEL: define noundef <3 x i1> @_Z13test_or_bool3Dv3_bS_(
|
||||
//CHECK-LABEL: define hidden noundef <3 x i1> @_Z13test_or_bool3Dv3_bS_(
|
||||
//CHECK-SAME: <3 x i1> noundef [[X:%.*]], <3 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
|
||||
//CHECK-NEXT: entry:
|
||||
//CHECK: [[HLSL_OR:%.*]] = or <3 x i1> [[A:%.*]], [[B:%.*]]
|
||||
@@ -32,7 +32,7 @@ bool3 test_or_bool3(bool3 x, bool3 y)
|
||||
return or(x, y);
|
||||
}
|
||||
|
||||
//CHECK-LABEL: define noundef <4 x i1> @_Z13test_or_bool4Dv4_bS_(
|
||||
//CHECK-LABEL: define hidden noundef <4 x i1> @_Z13test_or_bool4Dv4_bS_(
|
||||
//CHECK-SAME: <4 x i1> noundef [[X:%.*]], <4 x i1> noundef [[Y:%.*]]) #[[ATTR0]] {
|
||||
//CHECK-NEXT: entry:
|
||||
//CHECK: [[HLSL_OR:%.*]] = or <4 x i1> [[A:%.*]], [[B:%.*]]
|
||||
@@ -42,7 +42,7 @@ bool4 test_or_bool4(bool4 x, bool4 y)
|
||||
return or(x, y);
|
||||
}
|
||||
|
||||
//CHECK-LABEL: define noundef i1 @_Z11test_or_intii(
|
||||
//CHECK-LABEL: define hidden noundef i1 @_Z11test_or_intii(
|
||||
//CHECK-SAME: i32 noundef [[X:%.*]], i32 noundef [[Y:%.*]]) #[[ATTR0]] {
|
||||
//CHECK-NEXT: entry:
|
||||
//CHECK: [[TOBBOL:%.*]] = icmp ne i32 [[A:%.*]], 0
|
||||
@@ -54,7 +54,7 @@ bool test_or_int(int x, int y)
|
||||
return or(x, y);
|
||||
}
|
||||
|
||||
//CHECK-LABEL: define noundef <4 x i1> @_Z12test_or_int4Dv4_iS_(
|
||||
//CHECK-LABEL: define hidden noundef <4 x i1> @_Z12test_or_int4Dv4_iS_(
|
||||
//CHECK-SAME: <4 x i32> noundef [[X:%.*]], <4 x i32> noundef [[Y:%.*]]) #[[ATTR0]] {
|
||||
//CHECK-NEXT: entry:
|
||||
//CHECK: [[TOBOOL:%.*]] = icmp ne <4 x i32> [[A:%.*]], zeroinitializer
|
||||
@@ -66,7 +66,7 @@ bool4 test_or_int4(int4 x, int4 y)
|
||||
return or(x, y);
|
||||
}
|
||||
|
||||
//CHECK-LABEL: define noundef <4 x i1> @_Z14test_or_float4Dv4_fS_(
|
||||
//CHECK-LABEL: define hidden noundef <4 x i1> @_Z14test_or_float4Dv4_fS_(
|
||||
//CHECK-SAME: <4 x float> noundef nofpclass(nan inf) [[X:%.*]], <4 x float> noundef nofpclass(nan inf) [[Y:%.*]]) #[[ATTR0]] {
|
||||
//CHECK-NEXT: entry:
|
||||
//CHECK: [[TOBOOL:%.*]] = fcmp reassoc nnan ninf nsz arcp afn une <4 x float> [[A:%.*]], zeroinitializer
|
||||
|
||||
@@ -2,125 +2,125 @@
|
||||
// RUN: -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFLOATATTRS="reassoc nnan ninf nsz arcp afn"
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_pow_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_pow_double
|
||||
// CHECK: [[CONV0:%.*]] = fptrunc [[FLOATATTRS]] double %{{.*}} to float
|
||||
// CHECK: [[CONV1:%.*]] = fptrunc [[FLOATATTRS]] double %{{.*}} to float
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef float @llvm.pow.f32(float [[CONV0]], float [[CONV1]])
|
||||
// CHECK: ret float [[POW]]
|
||||
float test_pow_double(double p0, double p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_pow_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_pow_double2
|
||||
// CHECK: [[CONV0:%.*]] = fptrunc [[FLOATATTRS]] <2 x double> %{{.*}} to <2 x float>
|
||||
// CHECK: [[CONV1:%.*]] = fptrunc [[FLOATATTRS]] <2 x double> %{{.*}} to <2 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <2 x float> @llvm.pow.v2f32(<2 x float> [[CONV0]], <2 x float> [[CONV1]])
|
||||
// CHECK: ret <2 x float> [[POW]]
|
||||
float2 test_pow_double2(double2 p0, double2 p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_pow_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_pow_double3
|
||||
// CHECK: [[CONV0:%.*]] = fptrunc [[FLOATATTRS]] <3 x double> %{{.*}} to <3 x float>
|
||||
// CHECK: [[CONV1:%.*]] = fptrunc [[FLOATATTRS]] <3 x double> %{{.*}} to <3 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <3 x float> @llvm.pow.v3f32(<3 x float> [[CONV0]], <3 x float> [[CONV1]])
|
||||
// CHECK: ret <3 x float> [[POW]]
|
||||
float3 test_pow_double3(double3 p0, double3 p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_pow_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_pow_double4
|
||||
// CHECK: [[CONV0:%.*]] = fptrunc [[FLOATATTRS]] <4 x double> %{{.*}} to <4 x float>
|
||||
// CHECK: [[CONV1:%.*]] = fptrunc [[FLOATATTRS]] <4 x double> %{{.*}} to <4 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <4 x float> @llvm.pow.v4f32(<4 x float> [[CONV0]], <4 x float> [[CONV1]])
|
||||
// CHECK: ret <4 x float> [[POW]]
|
||||
float4 test_pow_double4(double4 p0, double4 p1) { return pow(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_pow_int
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_pow_int
|
||||
// CHECK: [[CONV0:%.*]] = sitofp i32 %{{.*}} to float
|
||||
// CHECK: [[CONV1:%.*]] = sitofp i32 %{{.*}} to float
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef float @llvm.pow.f32(float [[CONV0]], float [[CONV1]])
|
||||
// CHECK: ret float [[POW]]
|
||||
float test_pow_int(int p0, int p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_pow_int2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_pow_int2
|
||||
// CHECK: [[CONV0:%.*]] = sitofp <2 x i32> %{{.*}} to <2 x float>
|
||||
// CHECK: [[CONV1:%.*]] = sitofp <2 x i32> %{{.*}} to <2 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <2 x float> @llvm.pow.v2f32(<2 x float> [[CONV0]], <2 x float> [[CONV1]])
|
||||
// CHECK: ret <2 x float> [[POW]]
|
||||
float2 test_pow_int2(int2 p0, int2 p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_pow_int3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_pow_int3
|
||||
// CHECK: [[CONV0:%.*]] = sitofp <3 x i32> %{{.*}} to <3 x float>
|
||||
// CHECK: [[CONV1:%.*]] = sitofp <3 x i32> %{{.*}} to <3 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <3 x float> @llvm.pow.v3f32(<3 x float> [[CONV0]], <3 x float> [[CONV1]])
|
||||
// CHECK: ret <3 x float> [[POW]]
|
||||
float3 test_pow_int3(int3 p0, int3 p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_pow_int4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_pow_int4
|
||||
// CHECK: [[CONV0:%.*]] = sitofp <4 x i32> %{{.*}} to <4 x float>
|
||||
// CHECK: [[CONV1:%.*]] = sitofp <4 x i32> %{{.*}} to <4 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <4 x float> @llvm.pow.v4f32(<4 x float> [[CONV0]], <4 x float> [[CONV1]])
|
||||
// CHECK: ret <4 x float> [[POW]]
|
||||
float4 test_pow_int4(int4 p0, int4 p1) { return pow(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_pow_uint
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_pow_uint
|
||||
// CHECK: [[CONV0:%.*]] = uitofp i32 %{{.*}} to float
|
||||
// CHECK: [[CONV1:%.*]] = uitofp i32 %{{.*}} to float
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef float @llvm.pow.f32(float [[CONV0]], float [[CONV1]])
|
||||
// CHECK: ret float [[POW]]
|
||||
float test_pow_uint(uint p0, uint p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_pow_uint2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_pow_uint2
|
||||
// CHECK: [[CONV0:%.*]] = uitofp <2 x i32> %{{.*}} to <2 x float>
|
||||
// CHECK: [[CONV1:%.*]] = uitofp <2 x i32> %{{.*}} to <2 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <2 x float> @llvm.pow.v2f32(<2 x float> [[CONV0]], <2 x float> [[CONV1]])
|
||||
// CHECK: ret <2 x float> [[POW]]
|
||||
float2 test_pow_uint2(uint2 p0, uint2 p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_pow_uint3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_pow_uint3
|
||||
// CHECK: [[CONV0:%.*]] = uitofp <3 x i32> %{{.*}} to <3 x float>
|
||||
// CHECK: [[CONV1:%.*]] = uitofp <3 x i32> %{{.*}} to <3 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <3 x float> @llvm.pow.v3f32(<3 x float> [[CONV0]], <3 x float> [[CONV1]])
|
||||
// CHECK: ret <3 x float> [[POW]]
|
||||
float3 test_pow_uint3(uint3 p0, uint3 p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_pow_uint4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_pow_uint4
|
||||
// CHECK: [[CONV0:%.*]] = uitofp <4 x i32> %{{.*}} to <4 x float>
|
||||
// CHECK: [[CONV1:%.*]] = uitofp <4 x i32> %{{.*}} to <4 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <4 x float> @llvm.pow.v4f32(<4 x float> [[CONV0]], <4 x float> [[CONV1]])
|
||||
// CHECK: ret <4 x float> [[POW]]
|
||||
float4 test_pow_uint4(uint4 p0, uint4 p1) { return pow(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_pow_int64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_pow_int64_t
|
||||
// CHECK: [[CONV0:%.*]] = sitofp i64 %{{.*}} to float
|
||||
// CHECK: [[CONV1:%.*]] = sitofp i64 %{{.*}} to float
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef float @llvm.pow.f32(float [[CONV0]], float [[CONV1]])
|
||||
// CHECK: ret float [[POW]]
|
||||
float test_pow_int64_t(int64_t p0, int64_t p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_pow_int64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_pow_int64_t2
|
||||
// CHECK: [[CONV0:%.*]] = sitofp <2 x i64> %{{.*}} to <2 x float>
|
||||
// CHECK: [[CONV1:%.*]] = sitofp <2 x i64> %{{.*}} to <2 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <2 x float> @llvm.pow.v2f32(<2 x float> [[CONV0]], <2 x float> [[CONV1]])
|
||||
// CHECK: ret <2 x float> [[POW]]
|
||||
float2 test_pow_int64_t2(int64_t2 p0, int64_t2 p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_pow_int64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_pow_int64_t3
|
||||
// CHECK: [[CONV0:%.*]] = sitofp <3 x i64> %{{.*}} to <3 x float>
|
||||
// CHECK: [[CONV1:%.*]] = sitofp <3 x i64> %{{.*}} to <3 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <3 x float> @llvm.pow.v3f32(<3 x float> [[CONV0]], <3 x float> [[CONV1]])
|
||||
// CHECK: ret <3 x float> [[POW]]
|
||||
float3 test_pow_int64_t3(int64_t3 p0, int64_t3 p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_pow_int64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_pow_int64_t4
|
||||
// CHECK: [[CONV0:%.*]] = sitofp <4 x i64> %{{.*}} to <4 x float>
|
||||
// CHECK: [[CONV1:%.*]] = sitofp <4 x i64> %{{.*}} to <4 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <4 x float> @llvm.pow.v4f32(<4 x float> [[CONV0]], <4 x float> [[CONV1]])
|
||||
// CHECK: ret <4 x float> [[POW]]
|
||||
float4 test_pow_int64_t4(int64_t4 p0, int64_t4 p1) { return pow(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_pow_uint64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_pow_uint64_t
|
||||
// CHECK: [[CONV0:%.*]] = uitofp i64 %{{.*}} to float
|
||||
// CHECK: [[CONV1:%.*]] = uitofp i64 %{{.*}} to float
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef float @llvm.pow.f32(float [[CONV0]], float [[CONV1]])
|
||||
// CHECK: ret float [[POW]]
|
||||
float test_pow_uint64_t(uint64_t p0, uint64_t p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_pow_uint64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_pow_uint64_t2
|
||||
// CHECK: [[CONV0:%.*]] = uitofp <2 x i64> %{{.*}} to <2 x float>
|
||||
// CHECK: [[CONV1:%.*]] = uitofp <2 x i64> %{{.*}} to <2 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <2 x float> @llvm.pow.v2f32(<2 x float> [[CONV0]], <2 x float> [[CONV1]])
|
||||
// CHECK: ret <2 x float> [[POW]]
|
||||
float2 test_pow_uint64_t2(uint64_t2 p0, uint64_t2 p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_pow_uint64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_pow_uint64_t3
|
||||
// CHECK: [[CONV0:%.*]] = uitofp <3 x i64> %{{.*}} to <3 x float>
|
||||
// CHECK: [[CONV1:%.*]] = uitofp <3 x i64> %{{.*}} to <3 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <3 x float> @llvm.pow.v3f32(<3 x float> [[CONV0]], <3 x float> [[CONV1]])
|
||||
// CHECK: ret <3 x float> [[POW]]
|
||||
float3 test_pow_uint64_t3(uint64_t3 p0, uint64_t3 p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_pow_uint64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_pow_uint64_t4
|
||||
// CHECK: [[CONV0:%.*]] = uitofp <4 x i64> %{{.*}} to <4 x float>
|
||||
// CHECK: [[CONV1:%.*]] = uitofp <4 x i64> %{{.*}} to <4 x float>
|
||||
// CHECK: [[POW:%.*]] = call [[FLOATATTRS]] noundef <4 x float> @llvm.pow.v4f32(<4 x float> [[CONV0]], <4 x float> [[CONV1]])
|
||||
|
||||
@@ -5,36 +5,36 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z13test_pow_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z13test_pow_half
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.pow.f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z13test_pow_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z13test_pow_half
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.pow.f32(
|
||||
half test_pow_half(half p0, half p1) { return pow(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z14test_pow_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z14test_pow_half2
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.pow.v2f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z14test_pow_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z14test_pow_half2
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.pow.v2f32(
|
||||
half2 test_pow_half2(half2 p0, half2 p1) { return pow(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z14test_pow_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z14test_pow_half3
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.pow.v3f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z14test_pow_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z14test_pow_half3
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.pow.v3f32(
|
||||
half3 test_pow_half3(half3 p0, half3 p1) { return pow(p0, p1); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z14test_pow_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z14test_pow_half4
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.pow.v4f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z14test_pow_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z14test_pow_half4
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.pow.v4f32(
|
||||
half4 test_pow_half4(half4 p0, half4 p1) { return pow(p0, p1); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z14test_pow_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_pow_float
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.pow.f32(
|
||||
float test_pow_float(float p0, float p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z15test_pow_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_pow_float2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.pow.v2f32
|
||||
float2 test_pow_float2(float2 p0, float2 p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z15test_pow_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_pow_float3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.pow.v3f32
|
||||
float3 test_pow_float3(float3 p0, float3 p1) { return pow(p0, p1); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z15test_pow_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_pow_float4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.pow.v4f32
|
||||
float4 test_pow_float4(float4 p0, float4 p1) { return pow(p0, p1); }
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DTARGET=dx -DFNATTRS="noundef nofpclass(nan inf)"
|
||||
// RUN: -DTARGET=dx -DFNATTRS="hidden noundef nofpclass(nan inf)"
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DTARGET=spv -DFNATTRS="spir_func noundef nofpclass(nan inf)"
|
||||
// RUN: -DTARGET=spv -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)"
|
||||
|
||||
// CHECK: define [[FNATTRS]] float @
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn float @llvm.[[TARGET]].radians.f32(
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DTARGET=dx -DFNATTRS="noundef nofpclass(nan inf)"
|
||||
// RUN: -DTARGET=dx -DFNATTRS="hidden noundef nofpclass(nan inf)"
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DTARGET=dx -DFNATTRS="noundef nofpclass(nan inf)"
|
||||
// RUN: -DTARGET=dx -DFNATTRS="hidden noundef nofpclass(nan inf)"
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DTARGET=spv -DFNATTRS="spir_func noundef nofpclass(nan inf)"
|
||||
// RUN: -DTARGET=spv -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)"
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DTARGET=spv -DFNATTRS="spir_func noundef nofpclass(nan inf)"
|
||||
// RUN: -DTARGET=spv -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)"
|
||||
|
||||
|
||||
// NATIVE_HALF: define [[FNATTRS]] half @
|
||||
|
||||
@@ -13,90 +13,90 @@
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF,SPIR_NO_HALF,SPIR_CHECK
|
||||
|
||||
// DXIL_NATIVE_HALF: define noundef nofpclass(nan inf) half @
|
||||
// SPIR_NATIVE_HALF: define spir_func noundef nofpclass(nan inf) half @
|
||||
// DXIL_NATIVE_HALF: define hidden noundef nofpclass(nan inf) half @
|
||||
// SPIR_NATIVE_HALF: define hidden spir_func noundef nofpclass(nan inf) half @
|
||||
// NATIVE_HALF: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn half 0xH3C00, %{{.*}}
|
||||
// NATIVE_HALF: ret half %hlsl.rcp
|
||||
// DXIL_NO_HALF: define noundef nofpclass(nan inf) float @
|
||||
// SPIR_NO_HALF: define spir_func noundef nofpclass(nan inf) float @
|
||||
// DXIL_NO_HALF: define hidden noundef nofpclass(nan inf) float @
|
||||
// SPIR_NO_HALF: define hidden spir_func noundef nofpclass(nan inf) float @
|
||||
// NO_HALF: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn float 1.000000e+00, %{{.*}}
|
||||
// NO_HALF: ret float %hlsl.rcp
|
||||
half test_rcp_half(half p0) { return rcp(p0); }
|
||||
|
||||
// DXIL_NATIVE_HALF: define noundef nofpclass(nan inf) <2 x half> @
|
||||
// SPIR_NATIVE_HALF: define spir_func noundef nofpclass(nan inf) <2 x half> @
|
||||
// DXIL_NATIVE_HALF: define hidden noundef nofpclass(nan inf) <2 x half> @
|
||||
// SPIR_NATIVE_HALF: define hidden spir_func noundef nofpclass(nan inf) <2 x half> @
|
||||
// NATIVE_HALF: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn <2 x half> splat (half 0xH3C00), %{{.*}}
|
||||
// NATIVE_HALF: ret <2 x half> %hlsl.rcp
|
||||
// DXIL_NO_HALF: define noundef nofpclass(nan inf) <2 x float> @
|
||||
// SPIR_NO_HALF: define spir_func noundef nofpclass(nan inf) <2 x float> @
|
||||
// DXIL_NO_HALF: define hidden noundef nofpclass(nan inf) <2 x float> @
|
||||
// SPIR_NO_HALF: define hidden spir_func noundef nofpclass(nan inf) <2 x float> @
|
||||
// NO_HALF: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn <2 x float> splat (float 1.000000e+00), %{{.*}}
|
||||
// NO_HALF: ret <2 x float> %hlsl.rcp
|
||||
half2 test_rcp_half2(half2 p0) { return rcp(p0); }
|
||||
|
||||
// DXIL_NATIVE_HALF: define noundef nofpclass(nan inf) <3 x half> @
|
||||
// SPIR_NATIVE_HALF: define spir_func noundef nofpclass(nan inf) <3 x half> @
|
||||
// DXIL_NATIVE_HALF: define hidden noundef nofpclass(nan inf) <3 x half> @
|
||||
// SPIR_NATIVE_HALF: define hidden spir_func noundef nofpclass(nan inf) <3 x half> @
|
||||
// NATIVE_HALF: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn <3 x half> splat (half 0xH3C00), %{{.*}}
|
||||
// NATIVE_HALF: ret <3 x half> %hlsl.rcp
|
||||
// DXIL_NO_HALF: define noundef nofpclass(nan inf) <3 x float> @
|
||||
// SPIR_NO_HALF: define spir_func noundef nofpclass(nan inf) <3 x float> @
|
||||
// DXIL_NO_HALF: define hidden noundef nofpclass(nan inf) <3 x float> @
|
||||
// SPIR_NO_HALF: define hidden spir_func noundef nofpclass(nan inf) <3 x float> @
|
||||
// NO_HALF: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn <3 x float> splat (float 1.000000e+00), %{{.*}}
|
||||
// NO_HALF: ret <3 x float> %hlsl.rcp
|
||||
half3 test_rcp_half3(half3 p0) { return rcp(p0); }
|
||||
|
||||
// DXIL_NATIVE_HALF: define noundef nofpclass(nan inf) <4 x half> @
|
||||
// SPIR_NATIVE_HALF: define spir_func noundef nofpclass(nan inf) <4 x half> @
|
||||
// DXIL_NATIVE_HALF: define hidden noundef nofpclass(nan inf) <4 x half> @
|
||||
// SPIR_NATIVE_HALF: define hidden spir_func noundef nofpclass(nan inf) <4 x half> @
|
||||
// NATIVE_HALF: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn <4 x half> splat (half 0xH3C00), %{{.*}}
|
||||
// NATIVE_HALF: ret <4 x half> %hlsl.rcp
|
||||
// DXIL_NO_HALF: define noundef nofpclass(nan inf) <4 x float> @
|
||||
// SPIR_NO_HALF: define spir_func noundef nofpclass(nan inf) <4 x float> @
|
||||
// DXIL_NO_HALF: define hidden noundef nofpclass(nan inf) <4 x float> @
|
||||
// SPIR_NO_HALF: define hidden spir_func noundef nofpclass(nan inf) <4 x float> @
|
||||
// NO_HALF: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn <4 x float> splat (float 1.000000e+00), %{{.*}}
|
||||
// NO_HALF: ret <4 x float> %hlsl.rcp
|
||||
half4 test_rcp_half4(half4 p0) { return rcp(p0); }
|
||||
|
||||
// DXIL_CHECK: define noundef nofpclass(nan inf) float @
|
||||
// SPIR_CHECK: define spir_func noundef nofpclass(nan inf) float @
|
||||
// DXIL_CHECK: define hidden noundef nofpclass(nan inf) float @
|
||||
// SPIR_CHECK: define hidden spir_func noundef nofpclass(nan inf) float @
|
||||
// CHECK: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn float 1.000000e+00, %{{.*}}
|
||||
// CHECK: ret float %hlsl.rcp
|
||||
float test_rcp_float(float p0) { return rcp(p0); }
|
||||
|
||||
// DXIL_CHECK: define noundef nofpclass(nan inf) <2 x float> @
|
||||
// SPIR_CHECK: define spir_func noundef nofpclass(nan inf) <2 x float> @
|
||||
// DXIL_CHECK: define hidden noundef nofpclass(nan inf) <2 x float> @
|
||||
// SPIR_CHECK: define hidden spir_func noundef nofpclass(nan inf) <2 x float> @
|
||||
// CHECK: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn <2 x float> splat (float 1.000000e+00), %{{.*}}
|
||||
// CHECK: ret <2 x float> %hlsl.rcp
|
||||
float2 test_rcp_float2(float2 p0) { return rcp(p0); }
|
||||
|
||||
// DXIL_CHECK: define noundef nofpclass(nan inf) <3 x float> @
|
||||
// SPIR_CHECK: define spir_func noundef nofpclass(nan inf) <3 x float> @
|
||||
// DXIL_CHECK: define hidden noundef nofpclass(nan inf) <3 x float> @
|
||||
// SPIR_CHECK: define hidden spir_func noundef nofpclass(nan inf) <3 x float> @
|
||||
// CHECK: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn <3 x float> splat (float 1.000000e+00), %{{.*}}
|
||||
// CHECK: ret <3 x float> %hlsl.rcp
|
||||
float3 test_rcp_float3(float3 p0) { return rcp(p0); }
|
||||
|
||||
// DXIL_CHECK: define noundef nofpclass(nan inf) <4 x float> @
|
||||
// SPIR_CHECK: define spir_func noundef nofpclass(nan inf) <4 x float> @
|
||||
// DXIL_CHECK: define hidden noundef nofpclass(nan inf) <4 x float> @
|
||||
// SPIR_CHECK: define hidden spir_func noundef nofpclass(nan inf) <4 x float> @
|
||||
// CHECK: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn <4 x float> splat (float 1.000000e+00), %{{.*}}
|
||||
// CHECK: ret <4 x float> %hlsl.rcp
|
||||
float4 test_rcp_float4(float4 p0) { return rcp(p0); }
|
||||
|
||||
// DXIL_CHECK: define noundef nofpclass(nan inf) double @
|
||||
// SPIR_CHECK: define spir_func noundef nofpclass(nan inf) double @
|
||||
// DXIL_CHECK: define hidden noundef nofpclass(nan inf) double @
|
||||
// SPIR_CHECK: define hidden spir_func noundef nofpclass(nan inf) double @
|
||||
// CHECK: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn double 1.000000e+00, %{{.*}}
|
||||
// CHECK: ret double %hlsl.rcp
|
||||
double test_rcp_double(double p0) { return rcp(p0); }
|
||||
|
||||
// DXIL_CHECK: define noundef nofpclass(nan inf) <2 x double> @
|
||||
// SPIR_CHECK: define spir_func noundef nofpclass(nan inf) <2 x double> @
|
||||
// DXIL_CHECK: define hidden noundef nofpclass(nan inf) <2 x double> @
|
||||
// SPIR_CHECK: define hidden spir_func noundef nofpclass(nan inf) <2 x double> @
|
||||
// CHECK: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn <2 x double> splat (double 1.000000e+00), %{{.*}}
|
||||
// CHECK: ret <2 x double> %hlsl.rcp
|
||||
double2 test_rcp_double2(double2 p0) { return rcp(p0); }
|
||||
|
||||
// DXIL_CHECK: define noundef nofpclass(nan inf) <3 x double> @
|
||||
// SPIR_CHECK: define spir_func noundef nofpclass(nan inf) <3 x double> @
|
||||
// DXIL_CHECK: define hidden noundef nofpclass(nan inf) <3 x double> @
|
||||
// SPIR_CHECK: define hidden spir_func noundef nofpclass(nan inf) <3 x double> @
|
||||
// CHECK: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn <3 x double> splat (double 1.000000e+00), %{{.*}}
|
||||
// CHECK: ret <3 x double> %hlsl.rcp
|
||||
double3 test_rcp_double3(double3 p0) { return rcp(p0); }
|
||||
|
||||
// DXIL_CHECK: define noundef nofpclass(nan inf) <4 x double> @
|
||||
// SPIR_CHECK: define spir_func noundef nofpclass(nan inf) <4 x double> @
|
||||
// DXIL_CHECK: define hidden noundef nofpclass(nan inf) <4 x double> @
|
||||
// SPIR_CHECK: define hidden spir_func noundef nofpclass(nan inf) <4 x double> @
|
||||
// CHECK: %hlsl.rcp = fdiv reassoc nnan ninf nsz arcp afn <4 x double> splat (double 1.000000e+00), %{{.*}}
|
||||
// CHECK: ret <4 x double> %hlsl.rcp
|
||||
double4 test_rcp_double4(double4 p0) { return rcp(p0); }
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -O1 -o - | FileCheck %s --check-prefix=SPVCHECK
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) half @_Z17test_reflect_halfDhDh(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) half @_Z17test_reflect_halfDhDh(
|
||||
// CHECK-SAME: half noundef nofpclass(nan inf) [[I:%.*]], half noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[MUL_I:%.*]] = fmul reassoc nnan ninf nsz arcp afn half [[I]], 0xH4000
|
||||
@@ -15,7 +15,7 @@
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn half [[I]], [[MUL2_I]]
|
||||
// CHECK-NEXT: ret half [[SUB_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) half @_Z17test_reflect_halfDhDh(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) half @_Z17test_reflect_halfDhDh(
|
||||
// SPVCHECK-SAME: half noundef nofpclass(nan inf) [[I:%.*]], half noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[MUL_I:%.*]] = fmul reassoc nnan ninf nsz arcp afn half [[I]], 0xH4000
|
||||
@@ -28,7 +28,7 @@ half test_reflect_half(half I, half N) {
|
||||
return reflect(I, N);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z18test_reflect_half2Dv2_DhS_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z18test_reflect_half2Dv2_DhS_(
|
||||
// CHECK-SAME: <2 x half> noundef nofpclass(nan inf) [[I:%.*]], <2 x half> noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_DOT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn half @llvm.dx.fdot.v2f16(<2 x half> nofpclass(nan inf) [[I]], <2 x half> nofpclass(nan inf) [[N]])
|
||||
@@ -39,7 +39,7 @@ half test_reflect_half(half I, half N) {
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <2 x half> [[I]], [[MUL1_I]]
|
||||
// CHECK-NEXT: ret <2 x half> [[SUB_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) <2 x half> @_Z18test_reflect_half2Dv2_DhS_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) <2 x half> @_Z18test_reflect_half2Dv2_DhS_(
|
||||
// SPVCHECK-SAME: <2 x half> noundef nofpclass(nan inf) [[I:%.*]], <2 x half> noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_REFLECT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef <2 x half> @llvm.spv.reflect.v2f16(<2 x half> nofpclass(nan inf) [[I]], <2 x half> nofpclass(nan inf) [[N]])
|
||||
@@ -49,7 +49,7 @@ half2 test_reflect_half2(half2 I, half2 N) {
|
||||
return reflect(I, N);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z18test_reflect_half3Dv3_DhS_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z18test_reflect_half3Dv3_DhS_(
|
||||
// CHECK-SAME: <3 x half> noundef nofpclass(nan inf) [[I:%.*]], <3 x half> noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_DOT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn half @llvm.dx.fdot.v3f16(<3 x half> nofpclass(nan inf) [[I]], <3 x half> nofpclass(nan inf) [[N]])
|
||||
@@ -60,7 +60,7 @@ half2 test_reflect_half2(half2 I, half2 N) {
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <3 x half> [[I]], [[MUL1_I]]
|
||||
// CHECK-NEXT: ret <3 x half> [[SUB_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) <3 x half> @_Z18test_reflect_half3Dv3_DhS_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) <3 x half> @_Z18test_reflect_half3Dv3_DhS_(
|
||||
// SPVCHECK-SAME: <3 x half> noundef nofpclass(nan inf) [[I:%.*]], <3 x half> noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_REFLECT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef <3 x half> @llvm.spv.reflect.v3f16(<3 x half> nofpclass(nan inf) [[I]], <3 x half> nofpclass(nan inf) [[N]])
|
||||
@@ -70,7 +70,7 @@ half3 test_reflect_half3(half3 I, half3 N) {
|
||||
return reflect(I, N);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z18test_reflect_half4Dv4_DhS_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z18test_reflect_half4Dv4_DhS_(
|
||||
// CHECK-SAME: <4 x half> noundef nofpclass(nan inf) [[I:%.*]], <4 x half> noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_DOT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn half @llvm.dx.fdot.v4f16(<4 x half> nofpclass(nan inf) [[I]], <4 x half> nofpclass(nan inf) [[N]])
|
||||
@@ -81,7 +81,7 @@ half3 test_reflect_half3(half3 I, half3 N) {
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <4 x half> [[I]], [[MUL1_I]]
|
||||
// CHECK-NEXT: ret <4 x half> [[SUB_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) <4 x half> @_Z18test_reflect_half4Dv4_DhS_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) <4 x half> @_Z18test_reflect_half4Dv4_DhS_(
|
||||
// SPVCHECK-SAME: <4 x half> noundef nofpclass(nan inf) [[I:%.*]], <4 x half> noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_REFLECT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef <4 x half> @llvm.spv.reflect.v4f16(<4 x half> nofpclass(nan inf) [[I]], <4 x half> nofpclass(nan inf) [[N]])
|
||||
@@ -91,7 +91,7 @@ half4 test_reflect_half4(half4 I, half4 N) {
|
||||
return reflect(I, N);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z18test_reflect_floatff(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z18test_reflect_floatff(
|
||||
// CHECK-SAME: float noundef nofpclass(nan inf) [[I:%.*]], float noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[MUL_I:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[I]], 2.000000e+00
|
||||
@@ -100,7 +100,7 @@ half4 test_reflect_half4(half4 I, half4 N) {
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[I]], [[MUL2_I]]
|
||||
// CHECK-NEXT: ret float [[SUB_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) float @_Z18test_reflect_floatff(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) float @_Z18test_reflect_floatff(
|
||||
// SPVCHECK-SAME: float noundef nofpclass(nan inf) [[I:%.*]], float noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[MUL_I:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[I]], 2.000000e+00
|
||||
@@ -113,7 +113,7 @@ float test_reflect_float(float I, float N) {
|
||||
return reflect(I, N);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z19test_reflect_float2Dv2_fS_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z19test_reflect_float2Dv2_fS_(
|
||||
// CHECK-SAME: <2 x float> noundef nofpclass(nan inf) [[I:%.*]], <2 x float> noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_DOT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn float @llvm.dx.fdot.v2f32(<2 x float> nofpclass(nan inf) [[I]], <2 x float> nofpclass(nan inf) [[N]])
|
||||
@@ -124,7 +124,7 @@ float test_reflect_float(float I, float N) {
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <2 x float> [[I]], [[MUL1_I]]
|
||||
// CHECK-NEXT: ret <2 x float> [[SUB_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) <2 x float> @_Z19test_reflect_float2Dv2_fS_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) <2 x float> @_Z19test_reflect_float2Dv2_fS_(
|
||||
// SPVCHECK-SAME: <2 x float> noundef nofpclass(nan inf) [[I:%.*]], <2 x float> noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_REFLECT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef <2 x float> @llvm.spv.reflect.v2f32(<2 x float> nofpclass(nan inf) [[I]], <2 x float> nofpclass(nan inf) [[N]])
|
||||
@@ -134,7 +134,7 @@ float2 test_reflect_float2(float2 I, float2 N) {
|
||||
return reflect(I, N);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z19test_reflect_float3Dv3_fS_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z19test_reflect_float3Dv3_fS_(
|
||||
// CHECK-SAME: <3 x float> noundef nofpclass(nan inf) [[I:%.*]], <3 x float> noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_DOT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn float @llvm.dx.fdot.v3f32(<3 x float> nofpclass(nan inf) [[I]], <3 x float> nofpclass(nan inf) [[N]])
|
||||
@@ -145,7 +145,7 @@ float2 test_reflect_float2(float2 I, float2 N) {
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <3 x float> [[I]], [[MUL1_I]]
|
||||
// CHECK-NEXT: ret <3 x float> [[SUB_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) <3 x float> @_Z19test_reflect_float3Dv3_fS_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) <3 x float> @_Z19test_reflect_float3Dv3_fS_(
|
||||
// SPVCHECK-SAME: <3 x float> noundef nofpclass(nan inf) [[I:%.*]], <3 x float> noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_REFLECT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef <3 x float> @llvm.spv.reflect.v3f32(<3 x float> nofpclass(nan inf) [[I]], <3 x float> nofpclass(nan inf) [[N]])
|
||||
@@ -155,7 +155,7 @@ float3 test_reflect_float3(float3 I, float3 N) {
|
||||
return reflect(I, N);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z19test_reflect_float4Dv4_fS_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z19test_reflect_float4Dv4_fS_(
|
||||
// CHECK-SAME: <4 x float> noundef nofpclass(nan inf) [[I:%.*]], <4 x float> noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[HLSL_DOT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn float @llvm.dx.fdot.v4f32(<4 x float> nofpclass(nan inf) [[I]], <4 x float> nofpclass(nan inf) [[N]])
|
||||
@@ -166,7 +166,7 @@ float3 test_reflect_float3(float3 I, float3 N) {
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <4 x float> [[I]], [[MUL1_I]]
|
||||
// CHECK-NEXT: ret <4 x float> [[SUB_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) <4 x float> @_Z19test_reflect_float4Dv4_fS_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) <4 x float> @_Z19test_reflect_float4Dv4_fS_(
|
||||
// SPVCHECK-SAME: <4 x float> noundef nofpclass(nan inf) [[I:%.*]], <4 x float> noundef nofpclass(nan inf) [[N:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_REFLECT_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef <4 x float> @llvm.spv.reflect.v4f32(<4 x float> nofpclass(nan inf) [[I]], <4 x float> nofpclass(nan inf) [[N]])
|
||||
|
||||
@@ -3,25 +3,25 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -O3 -o - | FileCheck %s
|
||||
|
||||
#ifdef __HLSL_ENABLE_16_BIT
|
||||
// CHECK: define noundef i16 @
|
||||
// CHECK: define hidden noundef i16 @
|
||||
// CHECK: call i16 @llvm.bitreverse.i16(
|
||||
uint16_t test_bitreverse_ushort(uint16_t p0)
|
||||
{
|
||||
return reversebits(p0);
|
||||
}
|
||||
// CHECK: define noundef <2 x i16> @
|
||||
// CHECK: define hidden noundef <2 x i16> @
|
||||
// CHECK: call <2 x i16> @llvm.bitreverse.v2i16
|
||||
uint16_t2 test_bitreverse_ushort2(uint16_t2 p0)
|
||||
{
|
||||
return reversebits(p0);
|
||||
}
|
||||
// CHECK: define noundef <3 x i16> @
|
||||
// CHECK: define hidden noundef <3 x i16> @
|
||||
// CHECK: call <3 x i16> @llvm.bitreverse.v3i16
|
||||
uint16_t3 test_bitreverse_ushort3(uint16_t3 p0)
|
||||
{
|
||||
return reversebits(p0);
|
||||
}
|
||||
// CHECK: define noundef <4 x i16> @
|
||||
// CHECK: define hidden noundef <4 x i16> @
|
||||
// CHECK: call <4 x i16> @llvm.bitreverse.v4i16
|
||||
uint16_t4 test_bitreverse_ushort4(uint16_t4 p0)
|
||||
{
|
||||
@@ -29,50 +29,50 @@ uint16_t4 test_bitreverse_ushort4(uint16_t4 p0)
|
||||
}
|
||||
#endif
|
||||
|
||||
// CHECK: define noundef i32 @
|
||||
// CHECK: define hidden noundef i32 @
|
||||
// CHECK: call i32 @llvm.bitreverse.i32(
|
||||
int test_bitreverse_uint(uint p0)
|
||||
{
|
||||
return reversebits(p0);
|
||||
}
|
||||
// CHECK: define noundef <2 x i32> @
|
||||
// CHECK: define hidden noundef <2 x i32> @
|
||||
// CHECK: call <2 x i32> @llvm.bitreverse.v2i32
|
||||
uint2 test_bitreverse_uint2(uint2 p0)
|
||||
{
|
||||
return reversebits(p0);
|
||||
}
|
||||
// CHECK: define noundef <3 x i32> @
|
||||
// CHECK: define hidden noundef <3 x i32> @
|
||||
// CHECK: call <3 x i32> @llvm.bitreverse.v3i32
|
||||
uint3 test_bitreverse_uint3(uint3 p0)
|
||||
{
|
||||
return reversebits(p0);
|
||||
}
|
||||
// CHECK: define noundef <4 x i32> @
|
||||
// CHECK: define hidden noundef <4 x i32> @
|
||||
// CHECK: call <4 x i32> @llvm.bitreverse.v4i32
|
||||
uint4 test_bitreverse_uint4(uint4 p0)
|
||||
{
|
||||
return reversebits(p0);
|
||||
}
|
||||
|
||||
// CHECK: define noundef i64 @
|
||||
// CHECK: define hidden noundef i64 @
|
||||
// CHECK: call i64 @llvm.bitreverse.i64(
|
||||
uint64_t test_bitreverse_long(uint64_t p0)
|
||||
{
|
||||
return reversebits(p0);
|
||||
}
|
||||
// CHECK: define noundef <2 x i64> @
|
||||
// CHECK: define hidden noundef <2 x i64> @
|
||||
// CHECK: call <2 x i64> @llvm.bitreverse.v2i64
|
||||
uint64_t2 test_bitreverse_long2(uint64_t2 p0)
|
||||
{
|
||||
return reversebits(p0);
|
||||
}
|
||||
// CHECK: define noundef <3 x i64> @
|
||||
// CHECK: define hidden noundef <3 x i64> @
|
||||
// CHECK: call <3 x i64> @llvm.bitreverse.v3i64
|
||||
uint64_t3 test_bitreverse_long3(uint64_t3 p0)
|
||||
{
|
||||
return reversebits(p0);
|
||||
}
|
||||
// CHECK: define noundef <4 x i64> @
|
||||
// CHECK: define hidden noundef <4 x i64> @
|
||||
// CHECK: call <4 x i64> @llvm.bitreverse.v4i64
|
||||
uint64_t4 test_bitreverse_long4(uint64_t4 p0)
|
||||
{
|
||||
|
||||
@@ -2,87 +2,87 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_round_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_round_double
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn float @llvm.roundeven.f32(
|
||||
// CHECK: ret float %elt.roundeven
|
||||
float test_round_double(double p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_round_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_round_double2
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.roundeven.v2f32
|
||||
// CHECK: ret <2 x float> %elt.roundeven
|
||||
float2 test_round_double2(double2 p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_round_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_round_double3
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.roundeven.v3f32
|
||||
// CHECK: ret <3 x float> %elt.roundeven
|
||||
float3 test_round_double3(double3 p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_round_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_round_double4
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.roundeven.v4f32
|
||||
// CHECK: ret <4 x float> %elt.roundeven
|
||||
float4 test_round_double4(double4 p0) { return round(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_round_int
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_round_int
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn float @llvm.roundeven.f32(
|
||||
// CHECK: ret float %elt.roundeven
|
||||
float test_round_int(int p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_round_int2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_round_int2
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.roundeven.v2f32
|
||||
// CHECK: ret <2 x float> %elt.roundeven
|
||||
float2 test_round_int2(int2 p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_round_int3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_round_int3
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.roundeven.v3f32
|
||||
// CHECK: ret <3 x float> %elt.roundeven
|
||||
float3 test_round_int3(int3 p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_round_int4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_round_int4
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.roundeven.v4f32
|
||||
// CHECK: ret <4 x float> %elt.roundeven
|
||||
float4 test_round_int4(int4 p0) { return round(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_round_uint
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_round_uint
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn float @llvm.roundeven.f32(
|
||||
// CHECK: ret float %elt.roundeven
|
||||
float test_round_uint(uint p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_round_uint2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_round_uint2
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.roundeven.v2f32
|
||||
// CHECK: ret <2 x float> %elt.roundeven
|
||||
float2 test_round_uint2(uint2 p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_round_uint3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_round_uint3
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.roundeven.v3f32
|
||||
// CHECK: ret <3 x float> %elt.roundeven
|
||||
float3 test_round_uint3(uint3 p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_round_uint4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_round_uint4
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.roundeven.v4f32
|
||||
// CHECK: ret <4 x float> %elt.roundeven
|
||||
float4 test_round_uint4(uint4 p0) { return round(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_round_int64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_round_int64_t
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn float @llvm.roundeven.f32(
|
||||
// CHECK: ret float %elt.roundeven
|
||||
float test_round_int64_t(int64_t p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_round_int64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_round_int64_t2
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.roundeven.v2f32
|
||||
// CHECK: ret <2 x float> %elt.roundeven
|
||||
float2 test_round_int64_t2(int64_t2 p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_round_int64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_round_int64_t3
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.roundeven.v3f32
|
||||
// CHECK: ret <3 x float> %elt.roundeven
|
||||
float3 test_round_int64_t3(int64_t3 p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_round_int64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_round_int64_t4
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.roundeven.v4f32
|
||||
// CHECK: ret <4 x float> %elt.roundeven
|
||||
float4 test_round_int64_t4(int64_t4 p0) { return round(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_round_uint64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_round_uint64_t
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn float @llvm.roundeven.f32(
|
||||
// CHECK: ret float %elt.roundeven
|
||||
float test_round_uint64_t(uint64_t p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_round_uint64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_round_uint64_t2
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.roundeven.v2f32
|
||||
// CHECK: ret <2 x float> %elt.roundeven
|
||||
float2 test_round_uint64_t2(uint64_t2 p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_round_uint64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_round_uint64_t3
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.roundeven.v3f32
|
||||
// CHECK: ret <3 x float> %elt.roundeven
|
||||
float3 test_round_uint64_t3(uint64_t3 p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_round_uint64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_round_uint64_t4
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.roundeven.v4f32
|
||||
// CHECK: ret <4 x float> %elt.roundeven
|
||||
float4 test_round_uint64_t4(uint64_t4 p0) { return round(p0); }
|
||||
|
||||
@@ -5,48 +5,48 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z15test_round_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z15test_round_half
|
||||
// NATIVE_HALF: %elt.roundeven = call reassoc nnan ninf nsz arcp afn half @llvm.roundeven.f16(
|
||||
// NATIVE_HALF: ret half %elt.roundeven
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z15test_round_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z15test_round_half
|
||||
// NO_HALF: %elt.roundeven = call reassoc nnan ninf nsz arcp afn float @llvm.roundeven.f32(
|
||||
// NO_HALF: ret float %elt.roundeven
|
||||
half test_round_half(half p0) { return round(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z16test_round_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z16test_round_half2
|
||||
// NATIVE_HALF: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.roundeven.v2f16
|
||||
// NATIVE_HALF: ret <2 x half> %elt.roundeven
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z16test_round_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z16test_round_half2
|
||||
// NO_HALF: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.roundeven.v2f32(
|
||||
// NO_HALF: ret <2 x float> %elt.roundeven
|
||||
half2 test_round_half2(half2 p0) { return round(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z16test_round_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z16test_round_half3
|
||||
// NATIVE_HALF: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.roundeven.v3f16
|
||||
// NATIVE_HALF: ret <3 x half> %elt.roundeven
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z16test_round_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z16test_round_half3
|
||||
// NO_HALF: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.roundeven.v3f32(
|
||||
// NO_HALF: ret <3 x float> %elt.roundeven
|
||||
half3 test_round_half3(half3 p0) { return round(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z16test_round_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z16test_round_half4
|
||||
// NATIVE_HALF: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.roundeven.v4f16
|
||||
// NATIVE_HALF: ret <4 x half> %elt.roundeven
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z16test_round_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z16test_round_half4
|
||||
// NO_HALF: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.roundeven.v4f32(
|
||||
// NO_HALF: ret <4 x float> %elt.roundeven
|
||||
half4 test_round_half4(half4 p0) { return round(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z16test_round_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z16test_round_float
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn float @llvm.roundeven.f32(
|
||||
// CHECK: ret float %elt.roundeven
|
||||
float test_round_float(float p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z17test_round_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z17test_round_float2
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.roundeven.v2f32
|
||||
// CHECK: ret <2 x float> %elt.roundeven
|
||||
float2 test_round_float2(float2 p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z17test_round_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z17test_round_float3
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.roundeven.v3f32
|
||||
// CHECK: ret <3 x float> %elt.roundeven
|
||||
float3 test_round_float3(float3 p0) { return round(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z17test_round_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z17test_round_float4
|
||||
// CHECK: %elt.roundeven = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.roundeven.v4f32
|
||||
// CHECK: ret <4 x float> %elt.roundeven
|
||||
float4 test_round_float4(float4 p0) { return round(p0); }
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
|
||||
// CHECK: define [[FNATTRS]] float @
|
||||
// CHECK: %hlsl.rsqrt = call reassoc nnan ninf nsz arcp afn float @llvm.[[TARGET]].rsqrt.f32(
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
|
||||
// NATIVE_HALF: define [[FNATTRS]] half @
|
||||
// NATIVE_HALF: %hlsl.rsqrt = call reassoc nnan ninf nsz arcp afn half @llvm.[[TARGET]].rsqrt.f16(
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DTARGET=dx -DFNATTRS=noundef
|
||||
// RUN: -DTARGET=dx -DFNATTRS="hidden noundef"
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DTARGET=dx -DFNATTRS=noundef
|
||||
// RUN: -DTARGET=dx -DFNATTRS="hidden noundef"
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DTARGET=spv -DFNATTRS="spir_func noundef"
|
||||
// RUN: -DTARGET=spv -DFNATTRS="hidden spir_func noundef"
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DTARGET=spv -DFNATTRS="spir_func noundef"
|
||||
// RUN: -DTARGET=spv -DFNATTRS="hidden spir_func noundef"
|
||||
|
||||
// NATIVE_HALF: define [[FNATTRS]] i32 @
|
||||
// NATIVE_HALF: %hlsl.sign = call i32 @llvm.[[TARGET]].sign.f16(
|
||||
|
||||
@@ -2,67 +2,67 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_sin_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sin_double
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.sin.f32(
|
||||
float test_sin_double(double p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_double2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sin.v2f32
|
||||
float2 test_sin_double2(double2 p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_double3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sin.v3f32
|
||||
float3 test_sin_double3(double3 p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_double4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sin.v4f32
|
||||
float4 test_sin_double4(double4 p0) { return sin(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_sin_int
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sin_int
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.sin.f32(
|
||||
float test_sin_int(int p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_int2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_int2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sin.v2f32
|
||||
float2 test_sin_int2(int2 p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_int3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_int3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sin.v3f32
|
||||
float3 test_sin_int3(int3 p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_int4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_int4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sin.v4f32
|
||||
float4 test_sin_int4(int4 p0) { return sin(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_sin_uint
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sin_uint
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.sin.f32(
|
||||
float test_sin_uint(uint p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_uint2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_uint2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sin.v2f32
|
||||
float2 test_sin_uint2(uint2 p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_uint3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_uint3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sin.v3f32
|
||||
float3 test_sin_uint3(uint3 p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_uint4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_uint4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sin.v4f32
|
||||
float4 test_sin_uint4(uint4 p0) { return sin(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_sin_int64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sin_int64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.sin.f32(
|
||||
float test_sin_int64_t(int64_t p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_int64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_int64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sin.v2f32
|
||||
float2 test_sin_int64_t2(int64_t2 p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_int64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_int64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sin.v3f32
|
||||
float3 test_sin_int64_t3(int64_t3 p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_int64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_int64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sin.v4f32
|
||||
float4 test_sin_int64_t4(int64_t4 p0) { return sin(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_sin_uint64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sin_uint64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.sin.f32(
|
||||
float test_sin_uint64_t(uint64_t p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_uint64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_uint64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sin.v2f32
|
||||
float2 test_sin_uint64_t2(uint64_t2 p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_uint64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_uint64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sin.v3f32
|
||||
float3 test_sin_uint64_t3(uint64_t3 p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_uint64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_uint64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sin.v4f32
|
||||
float4 test_sin_uint64_t4(uint64_t4 p0) { return sin(p0); }
|
||||
|
||||
@@ -5,36 +5,36 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z13test_sin_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z13test_sin_half
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.sin.f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z13test_sin_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z13test_sin_half
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.sin.f32(
|
||||
half test_sin_half(half p0) { return sin(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z14test_sin_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z14test_sin_half2
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.sin.v2f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z14test_sin_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z14test_sin_half2
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sin.v2f32(
|
||||
half2 test_sin_half2(half2 p0) { return sin(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z14test_sin_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z14test_sin_half3
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.sin.v3f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z14test_sin_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z14test_sin_half3
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sin.v3f32(
|
||||
half3 test_sin_half3(half3 p0) { return sin(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z14test_sin_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z14test_sin_half4
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.sin.v4f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z14test_sin_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z14test_sin_half4
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sin.v4f32(
|
||||
half4 test_sin_half4(half4 p0) { return sin(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z14test_sin_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_sin_float
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.sin.f32(
|
||||
float test_sin_float(float p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z15test_sin_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_sin_float2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sin.v2f32
|
||||
float2 test_sin_float2(float2 p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z15test_sin_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_sin_float3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sin.v3f32
|
||||
float3 test_sin_float3(float3 p0) { return sin(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z15test_sin_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_sin_float4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sin.v4f32
|
||||
float4 test_sin_float4(float4 p0) { return sin(p0); }
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -O1 -o - | FileCheck %s --check-prefix=SPVCHECK
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) half @_Z20test_smoothstep_halfDhDhDh(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) half @_Z20test_smoothstep_halfDhDhDh(
|
||||
// CHECK-SAME: half noundef nofpclass(nan inf) [[MIN:%.*]], half noundef nofpclass(nan inf) [[MAX:%.*]], half noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn half [[X]], [[MIN]]
|
||||
@@ -19,7 +19,7 @@
|
||||
// CHECK-NEXT: [[MUL4_I:%.*]] = fmul reassoc nnan ninf nsz arcp afn half [[TMP0]], [[SUB2_I]]
|
||||
// CHECK-NEXT: ret half [[MUL4_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) half @_Z20test_smoothstep_halfDhDhDh(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) half @_Z20test_smoothstep_halfDhDhDh(
|
||||
// SPVCHECK-SAME: half noundef nofpclass(nan inf) [[MIN:%.*]], half noundef nofpclass(nan inf) [[MAX:%.*]], half noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_SMOOTHSTEP_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef half @llvm.spv.smoothstep.f16(half nofpclass(nan inf) [[MIN]], half nofpclass(nan inf) [[MAX]], half nofpclass(nan inf) [[X]])
|
||||
@@ -27,7 +27,7 @@
|
||||
//
|
||||
half test_smoothstep_half(half Min, half Max, half X) { return smoothstep(Min, Max, X); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z21test_smoothstep_half2Dv2_DhS_S_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z21test_smoothstep_half2Dv2_DhS_S_(
|
||||
// CHECK-SAME: <2 x half> noundef nofpclass(nan inf) [[MIN:%.*]], <2 x half> noundef nofpclass(nan inf) [[MAX:%.*]], <2 x half> noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <2 x half> [[X]], [[MIN]]
|
||||
@@ -40,7 +40,7 @@ half test_smoothstep_half(half Min, half Max, half X) { return smoothstep(Min, M
|
||||
// CHECK-NEXT: [[MUL4_I:%.*]] = fmul reassoc nnan ninf nsz arcp afn <2 x half> [[TMP0]], [[SUB2_I]]
|
||||
// CHECK-NEXT: ret <2 x half> [[MUL4_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) <2 x half> @_Z21test_smoothstep_half2Dv2_DhS_S_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) <2 x half> @_Z21test_smoothstep_half2Dv2_DhS_S_(
|
||||
// SPVCHECK-SAME: <2 x half> noundef nofpclass(nan inf) [[MIN:%.*]], <2 x half> noundef nofpclass(nan inf) [[MAX:%.*]], <2 x half> noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_SMOOTHSTEP_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef <2 x half> @llvm.spv.smoothstep.v2f16(<2 x half> nofpclass(nan inf) [[MIN]], <2 x half> nofpclass(nan inf) [[MAX]], <2 x half> nofpclass(nan inf) [[X]])
|
||||
@@ -48,7 +48,7 @@ half test_smoothstep_half(half Min, half Max, half X) { return smoothstep(Min, M
|
||||
//
|
||||
half2 test_smoothstep_half2(half2 Min, half2 Max, half2 X) { return smoothstep(Min, Max, X); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z21test_smoothstep_half3Dv3_DhS_S_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z21test_smoothstep_half3Dv3_DhS_S_(
|
||||
// CHECK-SAME: <3 x half> noundef nofpclass(nan inf) [[MIN:%.*]], <3 x half> noundef nofpclass(nan inf) [[MAX:%.*]], <3 x half> noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <3 x half> [[X]], [[MIN]]
|
||||
@@ -61,7 +61,7 @@ half2 test_smoothstep_half2(half2 Min, half2 Max, half2 X) { return smoothstep(M
|
||||
// CHECK-NEXT: [[MUL4_I:%.*]] = fmul reassoc nnan ninf nsz arcp afn <3 x half> [[TMP0]], [[SUB2_I]]
|
||||
// CHECK-NEXT: ret <3 x half> [[MUL4_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) <3 x half> @_Z21test_smoothstep_half3Dv3_DhS_S_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) <3 x half> @_Z21test_smoothstep_half3Dv3_DhS_S_(
|
||||
// SPVCHECK-SAME: <3 x half> noundef nofpclass(nan inf) [[MIN:%.*]], <3 x half> noundef nofpclass(nan inf) [[MAX:%.*]], <3 x half> noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_SMOOTHSTEP_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef <3 x half> @llvm.spv.smoothstep.v3f16(<3 x half> nofpclass(nan inf) [[MIN]], <3 x half> nofpclass(nan inf) [[MAX]], <3 x half> nofpclass(nan inf) [[X]])
|
||||
@@ -69,7 +69,7 @@ half2 test_smoothstep_half2(half2 Min, half2 Max, half2 X) { return smoothstep(M
|
||||
//
|
||||
half3 test_smoothstep_half3(half3 Min, half3 Max, half3 X) { return smoothstep(Min, Max, X); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z21test_smoothstep_half4Dv4_DhS_S_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z21test_smoothstep_half4Dv4_DhS_S_(
|
||||
// CHECK-SAME: <4 x half> noundef nofpclass(nan inf) [[MIN:%.*]], <4 x half> noundef nofpclass(nan inf) [[MAX:%.*]], <4 x half> noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <4 x half> [[X]], [[MIN]]
|
||||
@@ -82,7 +82,7 @@ half3 test_smoothstep_half3(half3 Min, half3 Max, half3 X) { return smoothstep(M
|
||||
// CHECK-NEXT: [[MUL4_I:%.*]] = fmul reassoc nnan ninf nsz arcp afn <4 x half> [[TMP0]], [[SUB2_I]]
|
||||
// CHECK-NEXT: ret <4 x half> [[MUL4_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) <4 x half> @_Z21test_smoothstep_half4Dv4_DhS_S_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) <4 x half> @_Z21test_smoothstep_half4Dv4_DhS_S_(
|
||||
// SPVCHECK-SAME: <4 x half> noundef nofpclass(nan inf) [[MIN:%.*]], <4 x half> noundef nofpclass(nan inf) [[MAX:%.*]], <4 x half> noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_SMOOTHSTEP_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef <4 x half> @llvm.spv.smoothstep.v4f16(<4 x half> nofpclass(nan inf) [[MIN]], <4 x half> nofpclass(nan inf) [[MAX]], <4 x half> nofpclass(nan inf) [[X]])
|
||||
@@ -90,7 +90,7 @@ half3 test_smoothstep_half3(half3 Min, half3 Max, half3 X) { return smoothstep(M
|
||||
//
|
||||
half4 test_smoothstep_half4(half4 Min, half4 Max, half4 X) { return smoothstep(Min, Max, X); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z21test_smoothstep_floatfff(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z21test_smoothstep_floatfff(
|
||||
// CHECK-SAME: float noundef nofpclass(nan inf) [[MIN:%.*]], float noundef nofpclass(nan inf) [[MAX:%.*]], float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn float [[X]], [[MIN]]
|
||||
@@ -103,7 +103,7 @@ half4 test_smoothstep_half4(half4 Min, half4 Max, half4 X) { return smoothstep(M
|
||||
// CHECK-NEXT: [[MUL4_I:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[TMP0]], [[SUB2_I]]
|
||||
// CHECK-NEXT: ret float [[MUL4_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) float @_Z21test_smoothstep_floatfff(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) float @_Z21test_smoothstep_floatfff(
|
||||
// SPVCHECK-SAME: float noundef nofpclass(nan inf) [[MIN:%.*]], float noundef nofpclass(nan inf) [[MAX:%.*]], float noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_SMOOTHSTEP_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef float @llvm.spv.smoothstep.f32(float nofpclass(nan inf) [[MIN]], float nofpclass(nan inf) [[MAX]], float nofpclass(nan inf) [[X]])
|
||||
@@ -111,7 +111,7 @@ half4 test_smoothstep_half4(half4 Min, half4 Max, half4 X) { return smoothstep(M
|
||||
//
|
||||
float test_smoothstep_float(float Min, float Max, float X) { return smoothstep(Min, Max, X); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z22test_smoothstep_float2Dv2_fS_S_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z22test_smoothstep_float2Dv2_fS_S_(
|
||||
// CHECK-SAME: <2 x float> noundef nofpclass(nan inf) [[MIN:%.*]], <2 x float> noundef nofpclass(nan inf) [[MAX:%.*]], <2 x float> noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <2 x float> [[X]], [[MIN]]
|
||||
@@ -124,7 +124,7 @@ float test_smoothstep_float(float Min, float Max, float X) { return smoothstep(M
|
||||
// CHECK-NEXT: [[MUL4_I:%.*]] = fmul reassoc nnan ninf nsz arcp afn <2 x float> [[TMP0]], [[SUB2_I]]
|
||||
// CHECK-NEXT: ret <2 x float> [[MUL4_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) <2 x float> @_Z22test_smoothstep_float2Dv2_fS_S_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) <2 x float> @_Z22test_smoothstep_float2Dv2_fS_S_(
|
||||
// SPVCHECK-SAME: <2 x float> noundef nofpclass(nan inf) [[MIN:%.*]], <2 x float> noundef nofpclass(nan inf) [[MAX:%.*]], <2 x float> noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_SMOOTHSTEP_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef <2 x float> @llvm.spv.smoothstep.v2f32(<2 x float> nofpclass(nan inf) [[MIN]], <2 x float> nofpclass(nan inf) [[MAX]], <2 x float> nofpclass(nan inf) [[X]])
|
||||
@@ -132,7 +132,7 @@ float test_smoothstep_float(float Min, float Max, float X) { return smoothstep(M
|
||||
//
|
||||
float2 test_smoothstep_float2(float2 Min, float2 Max, float2 X) { return smoothstep(Min, Max, X); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z22test_smoothstep_float3Dv3_fS_S_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z22test_smoothstep_float3Dv3_fS_S_(
|
||||
// CHECK-SAME: <3 x float> noundef nofpclass(nan inf) [[MIN:%.*]], <3 x float> noundef nofpclass(nan inf) [[MAX:%.*]], <3 x float> noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <3 x float> [[X]], [[MIN]]
|
||||
@@ -145,7 +145,7 @@ float2 test_smoothstep_float2(float2 Min, float2 Max, float2 X) { return smooths
|
||||
// CHECK-NEXT: [[MUL4_I:%.*]] = fmul reassoc nnan ninf nsz arcp afn <3 x float> [[TMP0]], [[SUB2_I]]
|
||||
// CHECK-NEXT: ret <3 x float> [[MUL4_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) <3 x float> @_Z22test_smoothstep_float3Dv3_fS_S_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) <3 x float> @_Z22test_smoothstep_float3Dv3_fS_S_(
|
||||
// SPVCHECK-SAME: <3 x float> noundef nofpclass(nan inf) [[MIN:%.*]], <3 x float> noundef nofpclass(nan inf) [[MAX:%.*]], <3 x float> noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_SMOOTHSTEP_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef <3 x float> @llvm.spv.smoothstep.v3f32(<3 x float> nofpclass(nan inf) [[MIN]], <3 x float> nofpclass(nan inf) [[MAX]], <3 x float> nofpclass(nan inf) [[X]])
|
||||
@@ -153,7 +153,7 @@ float2 test_smoothstep_float2(float2 Min, float2 Max, float2 X) { return smooths
|
||||
//
|
||||
float3 test_smoothstep_float3(float3 Min, float3 Max, float3 X) { return smoothstep(Min, Max, X); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z22test_smoothstep_float4Dv4_fS_S_(
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z22test_smoothstep_float4Dv4_fS_S_(
|
||||
// CHECK-SAME: <4 x float> noundef nofpclass(nan inf) [[MIN:%.*]], <4 x float> noundef nofpclass(nan inf) [[MAX:%.*]], <4 x float> noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// CHECK-NEXT: [[ENTRY:.*:]]
|
||||
// CHECK-NEXT: [[SUB_I:%.*]] = fsub reassoc nnan ninf nsz arcp afn <4 x float> [[X]], [[MIN]]
|
||||
@@ -166,7 +166,7 @@ float3 test_smoothstep_float3(float3 Min, float3 Max, float3 X) { return smooths
|
||||
// CHECK-NEXT: [[MUL4_I:%.*]] = fmul reassoc nnan ninf nsz arcp afn <4 x float> [[TMP0]], [[SUB2_I]]
|
||||
// CHECK-NEXT: ret <4 x float> [[MUL4_I]]
|
||||
//
|
||||
// SPVCHECK-LABEL: define spir_func noundef nofpclass(nan inf) <4 x float> @_Z22test_smoothstep_float4Dv4_fS_S_(
|
||||
// SPVCHECK-LABEL: define hidden spir_func noundef nofpclass(nan inf) <4 x float> @_Z22test_smoothstep_float4Dv4_fS_S_(
|
||||
// SPVCHECK-SAME: <4 x float> noundef nofpclass(nan inf) [[MIN:%.*]], <4 x float> noundef nofpclass(nan inf) [[MAX:%.*]], <4 x float> noundef nofpclass(nan inf) [[X:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
||||
// SPVCHECK-NEXT: [[ENTRY:.*:]]
|
||||
// SPVCHECK-NEXT: [[SPV_SMOOTHSTEP_I:%.*]] = tail call reassoc nnan ninf nsz arcp afn noundef <4 x float> @llvm.spv.smoothstep.v4f32(<4 x float> nofpclass(nan inf) [[MIN]], <4 x float> nofpclass(nan inf) [[MAX]], <4 x float> nofpclass(nan inf) [[X]])
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// CHECK-NEXT: extractvalue { i32, i32 } [[VALRET]], 0
|
||||
// CHECK-NEXT: extractvalue { i32, i32 } [[VALRET]], 1
|
||||
//
|
||||
// SPIRV: define spir_func {{.*}} i32 {{.*}}test_scalar{{.*}}(double {{.*}} [[VALD:%.*]])
|
||||
// SPIRV: define hidden spir_func {{.*}} i32 {{.*}}test_scalar{{.*}}(double {{.*}} [[VALD:%.*]])
|
||||
// SPIRV-NOT: @llvm.dx.splitdouble.i32
|
||||
// SPIRV: [[LOAD:%.*]] = load double, ptr [[VALD]].addr, align 8
|
||||
// SPIRV-NEXT: [[CAST:%.*]] = bitcast double [[LOAD]] to <2 x i32>
|
||||
@@ -26,7 +26,7 @@ uint test_scalar(double D) {
|
||||
// CHECK-NEXT: extractvalue { i32, i32 } [[VALRET]], 0
|
||||
// CHECK-NEXT: extractvalue { i32, i32 } [[VALRET]], 1
|
||||
//
|
||||
// SPIRV: define spir_func {{.*}} <1 x i32> {{.*}}test_double1{{.*}}(<1 x double> {{.*}} [[VALD:%.*]])
|
||||
// SPIRV: define hidden spir_func {{.*}} <1 x i32> {{.*}}test_double1{{.*}}(<1 x double> {{.*}} [[VALD:%.*]])
|
||||
// SPIRV-NOT: @llvm.dx.splitdouble.i32
|
||||
// SPIRV: [[LOAD:%.*]] = load <1 x double>, ptr [[VALD]].addr, align 8
|
||||
// SPIRV-NEXT: [[TRUNC:%.*]] = extractelement <1 x double> [[LOAD]], i64 0
|
||||
@@ -44,7 +44,7 @@ uint1 test_double1(double1 D) {
|
||||
// CHECK-NEXT: extractvalue { <2 x i32>, <2 x i32> } [[VALRET]], 0
|
||||
// CHECK-NEXT: extractvalue { <2 x i32>, <2 x i32> } [[VALRET]], 1
|
||||
//
|
||||
// SPIRV: define spir_func {{.*}} <2 x i32> {{.*}}test_vector2{{.*}}(<2 x double> {{.*}} [[VALD:%.*]])
|
||||
// SPIRV: define hidden spir_func {{.*}} <2 x i32> {{.*}}test_vector2{{.*}}(<2 x double> {{.*}} [[VALD:%.*]])
|
||||
// SPIRV-NOT: @llvm.dx.splitdouble.i32
|
||||
// SPIRV: [[LOAD:%.*]] = load <2 x double>, ptr [[VALD]].addr, align 16
|
||||
// SPIRV-NEXT: [[CAST1:%.*]] = bitcast <2 x double> [[LOAD]] to <4 x i32>
|
||||
@@ -61,7 +61,7 @@ uint2 test_vector2(double2 D) {
|
||||
// CHECK-NEXT: extractvalue { <3 x i32>, <3 x i32> } [[VALRET]], 0
|
||||
// CHECK-NEXT: extractvalue { <3 x i32>, <3 x i32> } [[VALRET]], 1
|
||||
//
|
||||
// SPIRV: define spir_func {{.*}} <3 x i32> {{.*}}test_vector3{{.*}}(<3 x double> {{.*}} [[VALD:%.*]])
|
||||
// SPIRV: define hidden spir_func {{.*}} <3 x i32> {{.*}}test_vector3{{.*}}(<3 x double> {{.*}} [[VALD:%.*]])
|
||||
// SPIRV-NOT: @llvm.dx.splitdouble.i32
|
||||
// SPIRV: [[LOAD:%.*]] = load <3 x double>, ptr [[VALD]].addr, align 32
|
||||
// SPIRV-NEXT: [[CAST1:%.*]] = bitcast <3 x double> [[LOAD]] to <6 x i32>
|
||||
@@ -78,7 +78,7 @@ uint3 test_vector3(double3 D) {
|
||||
// CHECK-NEXT: extractvalue { <4 x i32>, <4 x i32> } [[VALRET]], 0
|
||||
// CHECK-NEXT: extractvalue { <4 x i32>, <4 x i32> } [[VALRET]], 1
|
||||
//
|
||||
// SPIRV: define spir_func {{.*}} <4 x i32> {{.*}}test_vector4{{.*}}(<4 x double> {{.*}} [[VALD:%.*]])
|
||||
// SPIRV: define hidden spir_func {{.*}} <4 x i32> {{.*}}test_vector4{{.*}}(<4 x double> {{.*}} [[VALD:%.*]])
|
||||
// SPIRV-NOT: @llvm.dx.splitdouble.i32
|
||||
// SPIRV: [[LOAD:%.*]] = load <4 x double>, ptr [[VALD]].addr, align 32
|
||||
// SPIRV-NEXT: [[CAST1:%.*]] = bitcast <4 x double> [[LOAD]] to <8 x i32>
|
||||
|
||||
@@ -2,87 +2,87 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_sqrt_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sqrt_double
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn float @llvm.sqrt.f32(
|
||||
// CHECK: ret float %{{.*}}
|
||||
float test_sqrt_double(double p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_sqrt_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sqrt_double2
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sqrt.v2f32
|
||||
// CHECK: ret <2 x float> %{{.*}}
|
||||
float2 test_sqrt_double2(double2 p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_sqrt_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sqrt_double3
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sqrt.v3f32
|
||||
// CHECK: ret <3 x float> %{{.*}}
|
||||
float3 test_sqrt_double3(double3 p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_sqrt_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sqrt_double4
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sqrt.v4f32
|
||||
// CHECK: ret <4 x float> %{{.*}}
|
||||
float4 test_sqrt_double4(double4 p0) { return sqrt(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_sqrt_int
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sqrt_int
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn float @llvm.sqrt.f32(
|
||||
// CHECK: ret float %{{.*}}
|
||||
float test_sqrt_int(int p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_sqrt_int2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sqrt_int2
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sqrt.v2f32
|
||||
// CHECK: ret <2 x float> %{{.*}}
|
||||
float2 test_sqrt_int2(int2 p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_sqrt_int3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sqrt_int3
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sqrt.v3f32
|
||||
// CHECK: ret <3 x float> %{{.*}}
|
||||
float3 test_sqrt_int3(int3 p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_sqrt_int4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sqrt_int4
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sqrt.v4f32
|
||||
// CHECK: ret <4 x float> %{{.*}}
|
||||
float4 test_sqrt_int4(int4 p0) { return sqrt(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_sqrt_uint
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sqrt_uint
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn float @llvm.sqrt.f32(
|
||||
// CHECK: ret float %{{.*}}
|
||||
float test_sqrt_uint(uint p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_sqrt_uint2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sqrt_uint2
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sqrt.v2f32
|
||||
// CHECK: ret <2 x float> %{{.*}}
|
||||
float2 test_sqrt_uint2(uint2 p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_sqrt_uint3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sqrt_uint3
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sqrt.v3f32
|
||||
// CHECK: ret <3 x float> %{{.*}}
|
||||
float3 test_sqrt_uint3(uint3 p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_sqrt_uint4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sqrt_uint4
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sqrt.v4f32
|
||||
// CHECK: ret <4 x float> %{{.*}}
|
||||
float4 test_sqrt_uint4(uint4 p0) { return sqrt(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_sqrt_int64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sqrt_int64_t
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn float @llvm.sqrt.f32(
|
||||
// CHECK: ret float %{{.*}}
|
||||
float test_sqrt_int64_t(int64_t p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_sqrt_int64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sqrt_int64_t2
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sqrt.v2f32
|
||||
// CHECK: ret <2 x float> %{{.*}}
|
||||
float2 test_sqrt_int64_t2(int64_t2 p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_sqrt_int64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sqrt_int64_t3
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sqrt.v3f32
|
||||
// CHECK: ret <3 x float> %{{.*}}
|
||||
float3 test_sqrt_int64_t3(int64_t3 p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_sqrt_int64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sqrt_int64_t4
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sqrt.v4f32
|
||||
// CHECK: ret <4 x float> %{{.*}}
|
||||
float4 test_sqrt_int64_t4(int64_t4 p0) { return sqrt(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_sqrt_uint64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sqrt_uint64_t
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn float @llvm.sqrt.f32(
|
||||
// CHECK: ret float %{{.*}}
|
||||
float test_sqrt_uint64_t(uint64_t p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_sqrt_uint64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sqrt_uint64_t2
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sqrt.v2f32
|
||||
// CHECK: ret <2 x float> %{{.*}}
|
||||
float2 test_sqrt_uint64_t2(uint64_t2 p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_sqrt_uint64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sqrt_uint64_t3
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sqrt.v3f32
|
||||
// CHECK: ret <3 x float> %{{.*}}
|
||||
float3 test_sqrt_uint64_t3(uint64_t3 p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_sqrt_uint64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sqrt_uint64_t4
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sqrt.v4f32
|
||||
// CHECK: ret <4 x float> %{{.*}}
|
||||
float4 test_sqrt_uint64_t4(uint64_t4 p0) { return sqrt(p0); }
|
||||
|
||||
@@ -5,48 +5,48 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z14test_sqrt_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z14test_sqrt_half
|
||||
// NATIVE_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn half @llvm.sqrt.f16(
|
||||
// NATIVE_HALF: ret half %{{.*}}
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z14test_sqrt_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_sqrt_half
|
||||
// NO_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn float @llvm.sqrt.f32(
|
||||
// NO_HALF: ret float %{{.*}}
|
||||
half test_sqrt_half(half p0) { return sqrt(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z15test_sqrt_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z15test_sqrt_half2
|
||||
// NATIVE_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.sqrt.v2f16
|
||||
// NATIVE_HALF: ret <2 x half> %{{.*}}
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z15test_sqrt_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_sqrt_half2
|
||||
// NO_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sqrt.v2f32(
|
||||
// NO_HALF: ret <2 x float> %{{.*}}
|
||||
half2 test_sqrt_half2(half2 p0) { return sqrt(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z15test_sqrt_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z15test_sqrt_half3
|
||||
// NATIVE_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.sqrt.v3f16
|
||||
// NATIVE_HALF: ret <3 x half> %{{.*}}
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z15test_sqrt_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_sqrt_half3
|
||||
// NO_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sqrt.v3f32(
|
||||
// NO_HALF: ret <3 x float> %{{.*}}
|
||||
half3 test_sqrt_half3(half3 p0) { return sqrt(p0); }
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z15test_sqrt_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z15test_sqrt_half4
|
||||
// NATIVE_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.sqrt.v4f16
|
||||
// NATIVE_HALF: ret <4 x half> %{{.*}}
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z15test_sqrt_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_sqrt_half4
|
||||
// NO_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sqrt.v4f32(
|
||||
// NO_HALF: ret <4 x float> %{{.*}}
|
||||
half4 test_sqrt_half4(half4 p0) { return sqrt(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z15test_sqrt_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z15test_sqrt_float
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn float @llvm.sqrt.f32(
|
||||
// CHECK: ret float %{{.*}}
|
||||
float test_sqrt_float(float p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z16test_sqrt_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z16test_sqrt_float2
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sqrt.v2f32
|
||||
// CHECK: ret <2 x float> %{{.*}}
|
||||
float2 test_sqrt_float2(float2 p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z16test_sqrt_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z16test_sqrt_float3
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sqrt.v3f32
|
||||
// CHECK: ret <3 x float> %{{.*}}
|
||||
float3 test_sqrt_float3(float3 p0) { return sqrt(p0); }
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z16test_sqrt_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z16test_sqrt_float4
|
||||
// CHECK: %{{.*}} = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sqrt.v4f32
|
||||
// CHECK: ret <4 x float> %{{.*}}
|
||||
float4 test_sqrt_float4(float4 p0) { return sqrt(p0); }
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
|
||||
// CHECK: define [[FNATTRS]] float @
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.[[TARGET]].step.f32(float
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DFNATTRS="noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,NATIVE_HALF \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
||||
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \
|
||||
// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
// RUN: -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
|
||||
|
||||
// NATIVE_HALF: define [[FNATTRS]] half @
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.[[TARGET]].step.f16(half
|
||||
|
||||
@@ -2,82 +2,82 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_trunc_double
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_trunc_double
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.trunc.f32(
|
||||
float test_trunc_double(double p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_double2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_double2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.trunc.v2f32
|
||||
float2 test_trunc_double2(double2 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_double3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_double3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.trunc.v3f32
|
||||
float3 test_trunc_double3(double3 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_double4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_double4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.trunc.v4f32
|
||||
float4 test_trunc_double4(double4 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_trunc_int
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_trunc_int
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.trunc.f32(
|
||||
float test_trunc_int(int p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_int2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_int2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.trunc.v2f32
|
||||
float2 test_trunc_int2(int2 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_int3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_int3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.trunc.v3f32
|
||||
float3 test_trunc_int3(int3 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_int4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_int4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.trunc.v4f32
|
||||
float4 test_trunc_int4(int4 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_trunc_uint
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_trunc_uint
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.trunc.f32(
|
||||
float test_trunc_uint(uint p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_uint2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_uint2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.trunc.v2f32
|
||||
float2 test_trunc_uint2(uint2 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_uint3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_uint3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.trunc.v3f32
|
||||
float3 test_trunc_uint3(uint3 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_uint4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_uint4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.trunc.v4f32
|
||||
float4 test_trunc_uint4(uint4 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_trunc_int64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_trunc_int64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.trunc.f32(
|
||||
float test_trunc_int64_t(int64_t p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_int64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_int64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.trunc.v2f32
|
||||
float2 test_trunc_int64_t2(int64_t2 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_int64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_int64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.trunc.v3f32
|
||||
float3 test_trunc_int64_t3(int64_t3 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_int64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_int64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.trunc.v4f32
|
||||
float4 test_trunc_int64_t4(int64_t4 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float {{.*}}test_trunc_uint64_t
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_trunc_uint64_t
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.trunc.f32(
|
||||
float test_trunc_uint64_t(uint64_t p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_uint64_t2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_uint64_t2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.trunc.v2f32
|
||||
float2 test_trunc_uint64_t2(uint64_t2 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_uint64_t3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_uint64_t3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.trunc.v3f32
|
||||
float3 test_trunc_uint64_t3(uint64_t3 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_uint64_t4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_uint64_t4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.trunc.v4f32
|
||||
float4 test_trunc_uint64_t4(uint64_t4 p0) { return trunc(p0); }
|
||||
|
||||
@@ -5,42 +5,42 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | \
|
||||
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) half @_Z15test_trunc_half
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z15test_trunc_half
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.trunc.f16(
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) float @_Z15test_trunc_half
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z15test_trunc_half
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.trunc.f32(
|
||||
half test_trunc_half(half p0) { return trunc(p0); }
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <2 x half> @_Z16test_trunc_half2
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z16test_trunc_half2
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.trunc.v2f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z16test_trunc_half2
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z16test_trunc_half2
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.trunc.v2f32(
|
||||
half2 test_trunc_half2(half2 p0) { return trunc(p0); }
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <3 x half> @_Z16test_trunc_half3
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z16test_trunc_half3
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.trunc.v3f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z16test_trunc_half3
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z16test_trunc_half3
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.trunc.v3f32(
|
||||
half3 test_trunc_half3(half3 p0) { return trunc(p0); }
|
||||
|
||||
// NATIVE_HALF-LABEL: define noundef nofpclass(nan inf) <4 x half> @_Z16test_trunc_half4
|
||||
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z16test_trunc_half4
|
||||
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.trunc.v4f16
|
||||
// NO_HALF-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z16test_trunc_half4
|
||||
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z16test_trunc_half4
|
||||
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.trunc.v4f32(
|
||||
half4 test_trunc_half4(half4 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) float @_Z16test_trunc_float
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z16test_trunc_float
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.trunc.f32(
|
||||
float test_trunc_float(float p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <2 x float> @_Z17test_trunc_float2
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z17test_trunc_float2
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.trunc.v2f32
|
||||
float2 test_trunc_float2(float2 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <3 x float> @_Z17test_trunc_float3
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z17test_trunc_float3
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.trunc.v3f32
|
||||
float3 test_trunc_float3(float3 p0) { return trunc(p0); }
|
||||
|
||||
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z17test_trunc_float4
|
||||
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z17test_trunc_float4
|
||||
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.trunc.v4f32
|
||||
float4 test_trunc_float4(float4 p0) { return trunc(p0); }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-pc-vulkan-library %s -emit-llvm -disable-llvm-passes -o - | FileCheck %s
|
||||
|
||||
// CHECK: define spir_func void @{{.*main.*}}() [[A0:#[0-9]+]] {
|
||||
// CHECK: define hidden spir_func void @{{.*main.*}}() [[A0:#[0-9]+]] {
|
||||
void main() {
|
||||
// CHECK: entry:
|
||||
// CHECK: %[[CT_ENTRY:[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
||||
// RUN: --check-prefixes=CHECK,CHECK-DXIL
|
||||
|
||||
// CHECK-SPIRV: define spir_func noundef i32 @{{.*test_1.*}}() [[A0:#[0-9]+]] {
|
||||
// CHECK-DXIL: define noundef i32 @{{.*test_1.*}}() [[A0:#[0-9]+]] {
|
||||
// CHECK-SPIRV: define hidden spir_func noundef i32 @{{.*test_1.*}}() [[A0:#[0-9]+]] {
|
||||
// CHECK-DXIL: define hidden noundef i32 @{{.*test_1.*}}() [[A0:#[0-9]+]] {
|
||||
// CHECK-SPIRV: %[[CI:[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
// CHECK-SPIRV: call spir_func i32 @__hlsl_wave_get_lane_index() [ "convergencectrl"(token %[[CI]]) ]
|
||||
// CHECK-DXIL: call i32 @llvm.dx.wave.getlaneindex()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
|
||||
// RUN: spirv-pc-vulkan-library %s -emit-llvm -disable-llvm-passes -o - | FileCheck %s
|
||||
|
||||
// CHECK: define spir_func noundef i32 @_Z6test_1v() [[A0:#[0-9]+]] {
|
||||
// CHECK: define hidden spir_func noundef i32 @_Z6test_1v() [[A0:#[0-9]+]] {
|
||||
// CHECK: %[[C1:[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
// CHECK: call spir_func i32 @__hlsl_wave_get_lane_index() [ "convergencectrl"(token %[[C1]]) ]
|
||||
uint test_1() {
|
||||
@@ -10,7 +10,7 @@ uint test_1() {
|
||||
|
||||
// CHECK-DAG: declare spir_func i32 @__hlsl_wave_get_lane_index() [[A1:#[0-9]+]]
|
||||
|
||||
// CHECK: define spir_func noundef i32 @_Z6test_2v() [[A0]] {
|
||||
// CHECK: define hidden spir_func noundef i32 @_Z6test_2v() [[A0]] {
|
||||
// CHECK: %[[C2:[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
// CHECK: call spir_func noundef i32 @_Z6test_1v() {{#[0-9]+}} [ "convergencectrl"(token %[[C2]]) ]
|
||||
uint test_2() {
|
||||
|
||||
@@ -46,14 +46,14 @@ cbuffer CBScalars : register(b1, space5) {
|
||||
|
||||
// CHECK: @CBScalars.cb = global target("dx.CBuffer", target("dx.Layout", %__cblayout_CBScalars,
|
||||
// CHECK-SAME: 56, 0, 8, 16, 24, 32, 36, 40, 48))
|
||||
// CHECK: @a1 = external addrspace(2) global float, align 4
|
||||
// CHECK: @a2 = external addrspace(2) global double, align 8
|
||||
// CHECK: @a3 = external addrspace(2) global half, align 2
|
||||
// CHECK: @a4 = external addrspace(2) global i64, align 8
|
||||
// CHECK: @a5 = external addrspace(2) global i32, align 4
|
||||
// CHECK: @a6 = external addrspace(2) global i16, align 2
|
||||
// CHECK: @a7 = external addrspace(2) global i32, align 4
|
||||
// CHECK: @a8 = external addrspace(2) global i64, align 8
|
||||
// CHECK: @a1 = external hidden addrspace(2) global float, align 4
|
||||
// CHECK: @a2 = external hidden addrspace(2) global double, align 8
|
||||
// CHECK: @a3 = external hidden addrspace(2) global half, align 2
|
||||
// CHECK: @a4 = external hidden addrspace(2) global i64, align 8
|
||||
// CHECK: @a5 = external hidden addrspace(2) global i32, align 4
|
||||
// CHECK: @a6 = external hidden addrspace(2) global i16, align 2
|
||||
// CHECK: @a7 = external hidden addrspace(2) global i32, align 4
|
||||
// CHECK: @a8 = external hidden addrspace(2) global i64, align 8
|
||||
// CHECK: @CBScalars.str = private unnamed_addr constant [10 x i8] c"CBScalars\00", align 1
|
||||
|
||||
cbuffer CBVectors {
|
||||
@@ -69,13 +69,13 @@ cbuffer CBVectors {
|
||||
|
||||
// CHECK: @CBVectors.cb = global target("dx.CBuffer", target("dx.Layout", %__cblayout_CBVectors,
|
||||
// CHECK-SAME: 136, 0, 16, 40, 48, 80, 96, 112))
|
||||
// CHECK: @b1 = external addrspace(2) global <3 x float>, align 16
|
||||
// CHECK: @b2 = external addrspace(2) global <3 x double>, align 32
|
||||
// CHECK: @b3 = external addrspace(2) global <2 x half>, align 4
|
||||
// CHECK: @b4 = external addrspace(2) global <3 x i64>, align 32
|
||||
// CHECK: @b5 = external addrspace(2) global <4 x i32>, align 16
|
||||
// CHECK: @b6 = external addrspace(2) global <3 x i16>, align 8
|
||||
// CHECK: @b7 = external addrspace(2) global <3 x i64>, align 32
|
||||
// CHECK: @b1 = external hidden addrspace(2) global <3 x float>, align 16
|
||||
// CHECK: @b2 = external hidden addrspace(2) global <3 x double>, align 32
|
||||
// CHECK: @b3 = external hidden addrspace(2) global <2 x half>, align 4
|
||||
// CHECK: @b4 = external hidden addrspace(2) global <3 x i64>, align 32
|
||||
// CHECK: @b5 = external hidden addrspace(2) global <4 x i32>, align 16
|
||||
// CHECK: @b6 = external hidden addrspace(2) global <3 x i16>, align 8
|
||||
// CHECK: @b7 = external hidden addrspace(2) global <3 x i64>, align 32
|
||||
// CHECK: @CBVectors.str = private unnamed_addr constant [10 x i8] c"CBVectors\00", align 1
|
||||
|
||||
cbuffer CBArrays : register(b2) {
|
||||
@@ -91,14 +91,14 @@ cbuffer CBArrays : register(b2) {
|
||||
|
||||
// CHECK: @CBArrays.cb = global target("dx.CBuffer", target("dx.Layout", %__cblayout_CBArrays,
|
||||
// CHECK-SAME: 708, 0, 48, 112, 176, 224, 608, 624, 656))
|
||||
// CHECK: @c1 = external addrspace(2) global [3 x float], align 4
|
||||
// CHECK: @c2 = external addrspace(2) global [2 x <3 x double>], align 32
|
||||
// CHECK: @c3 = external addrspace(2) global [2 x [2 x half]], align 2
|
||||
// CHECK: @c4 = external addrspace(2) global [3 x i64], align 8
|
||||
// CHECK: @c5 = external addrspace(2) global [2 x [3 x [4 x <4 x i32>]]], align 16
|
||||
// CHECK: @c6 = external addrspace(2) global [1 x i16], align 2
|
||||
// CHECK: @c7 = external addrspace(2) global [2 x i64], align 8
|
||||
// CHECK: @c8 = external addrspace(2) global [4 x i32], align 4
|
||||
// CHECK: @c1 = external hidden addrspace(2) global [3 x float], align 4
|
||||
// CHECK: @c2 = external hidden addrspace(2) global [2 x <3 x double>], align 32
|
||||
// CHECK: @c3 = external hidden addrspace(2) global [2 x [2 x half]], align 2
|
||||
// CHECK: @c4 = external hidden addrspace(2) global [3 x i64], align 8
|
||||
// CHECK: @c5 = external hidden addrspace(2) global [2 x [3 x [4 x <4 x i32>]]], align 16
|
||||
// CHECK: @c6 = external hidden addrspace(2) global [1 x i16], align 2
|
||||
// CHECK: @c7 = external hidden addrspace(2) global [2 x i64], align 8
|
||||
// CHECK: @c8 = external hidden addrspace(2) global [4 x i32], align 4
|
||||
// CHECK: @CBArrays.str = private unnamed_addr constant [9 x i8] c"CBArrays\00", align 1
|
||||
|
||||
typedef uint32_t4 uint32_t8[2];
|
||||
@@ -112,8 +112,8 @@ cbuffer CBTypedefArray : register(space2) {
|
||||
|
||||
// CHECK: @CBTypedefArray.cb = global target("dx.CBuffer", target("dx.Layout", %__cblayout_CBTypedefArray,
|
||||
// CHECK-SAME: 128, 0, 64))
|
||||
// CHECK: @t1 = external addrspace(2) global [2 x [2 x <4 x i32>]], align 16
|
||||
// CHECK: @t2 = external addrspace(2) global [2 x [2 x <4 x i32>]], align 16
|
||||
// CHECK: @t1 = external hidden addrspace(2) global [2 x [2 x <4 x i32>]], align 16
|
||||
// CHECK: @t2 = external hidden addrspace(2) global [2 x [2 x <4 x i32>]], align 16
|
||||
// CHECK: @CBTypedefArray.str = private unnamed_addr constant [15 x i8] c"CBTypedefArray\00", align 1
|
||||
struct Empty {};
|
||||
|
||||
@@ -137,13 +137,13 @@ struct D {
|
||||
|
||||
// CHECK: @CBStructs.cb = global target("dx.CBuffer", target("dx.Layout", %__cblayout_CBStructs,
|
||||
// CHECK-SAME: 246, 0, 16, 32, 64, 144, 238, 240))
|
||||
// CHECK: @a = external addrspace(2) global target("dx.Layout", %A, 8, 0), align 1
|
||||
// CHECK: @b = external addrspace(2) global target("dx.Layout", %B, 14, 0, 8), align 1
|
||||
// CHECK: @c = external addrspace(2) global target("dx.Layout", %C, 24, 0, 16), align 1
|
||||
// CHECK: @array_of_A = external addrspace(2) global [5 x target("dx.Layout", %A, 8, 0)], align 1
|
||||
// CHECK: @d = external addrspace(2) global target("dx.Layout", %__cblayout_D, 94, 0), align 1
|
||||
// CHECK: @e = external addrspace(2) global half, align 2
|
||||
// CHECK: @f = external addrspace(2) global <3 x i16>, align 8
|
||||
// CHECK: @a = external hidden addrspace(2) global target("dx.Layout", %A, 8, 0), align 1
|
||||
// CHECK: @b = external hidden addrspace(2) global target("dx.Layout", %B, 14, 0, 8), align 1
|
||||
// CHECK: @c = external hidden addrspace(2) global target("dx.Layout", %C, 24, 0, 16), align 1
|
||||
// CHECK: @array_of_A = external hidden addrspace(2) global [5 x target("dx.Layout", %A, 8, 0)], align 1
|
||||
// CHECK: @d = external hidden addrspace(2) global target("dx.Layout", %__cblayout_D, 94, 0), align 1
|
||||
// CHECK: @e = external hidden addrspace(2) global half, align 2
|
||||
// CHECK: @f = external hidden addrspace(2) global <3 x i16>, align 8
|
||||
// CHECK: @CBStructs.str = private unnamed_addr constant [10 x i8] c"CBStructs\00", align 1
|
||||
|
||||
cbuffer CBStructs {
|
||||
@@ -178,10 +178,10 @@ cbuffer CBClasses {
|
||||
|
||||
// CHECK: @CBClasses.cb = global target("dx.CBuffer", target("dx.Layout", %__cblayout_CBClasses,
|
||||
// CHECK-SAME: 260, 0, 16, 32, 112))
|
||||
// CHECK: @k = external addrspace(2) global target("dx.Layout", %K, 4, 0), align 1
|
||||
// CHECK: @l = external addrspace(2) global target("dx.Layout", %L, 8, 0, 4), align 1
|
||||
// CHECK: @m = external addrspace(2) global target("dx.Layout", %M, 68, 0), align 1
|
||||
// CHECK: @ka = external addrspace(2) global [10 x target("dx.Layout", %K, 4, 0)], align 1
|
||||
// CHECK: @k = external hidden addrspace(2) global target("dx.Layout", %K, 4, 0), align 1
|
||||
// CHECK: @l = external hidden addrspace(2) global target("dx.Layout", %L, 8, 0, 4), align 1
|
||||
// CHECK: @m = external hidden addrspace(2) global target("dx.Layout", %M, 68, 0), align 1
|
||||
// CHECK: @ka = external hidden addrspace(2) global [10 x target("dx.Layout", %K, 4, 0)], align 1
|
||||
// CHECK: @CBClasses.str = private unnamed_addr constant [10 x i8] c"CBClasses\00", align 1
|
||||
|
||||
struct Test {
|
||||
@@ -190,16 +190,16 @@ struct Test {
|
||||
|
||||
// CHECK: @CBMix.cb = global target("dx.CBuffer", target("dx.Layout", %__cblayout_CBMix,
|
||||
// CHECK-SAME: 170, 0, 24, 32, 120, 128, 136, 144, 152, 160, 168))
|
||||
// CHECK: @test = external addrspace(2) global [2 x target("dx.Layout", %Test, 8, 0, 4)], align 1
|
||||
// CHECK: @f1 = external addrspace(2) global float, align 4
|
||||
// CHECK: @f2 = external addrspace(2) global [3 x [2 x <2 x float>]], align 8
|
||||
// CHECK: @f3 = external addrspace(2) global float, align 4
|
||||
// CHECK: @f4 = external addrspace(2) global target("dx.Layout", %anon, 4, 0), align 1
|
||||
// CHECK: @f5 = external addrspace(2) global double, align 8
|
||||
// CHECK: @f6 = external addrspace(2) global target("dx.Layout", %anon.0, 8, 0), align 1
|
||||
// CHECK: @f7 = external addrspace(2) global float, align 4
|
||||
// CHECK: @f8 = external addrspace(2) global <1 x double>, align 8
|
||||
// CHECK: @f9 = external addrspace(2) global i16, align 2
|
||||
// CHECK: @test = external hidden addrspace(2) global [2 x target("dx.Layout", %Test, 8, 0, 4)], align 1
|
||||
// CHECK: @f1 = external hidden addrspace(2) global float, align 4
|
||||
// CHECK: @f2 = external hidden addrspace(2) global [3 x [2 x <2 x float>]], align 8
|
||||
// CHECK: @f3 = external hidden addrspace(2) global float, align 4
|
||||
// CHECK: @f4 = external hidden addrspace(2) global target("dx.Layout", %anon, 4, 0), align 1
|
||||
// CHECK: @f5 = external hidden addrspace(2) global double, align 8
|
||||
// CHECK: @f6 = external hidden addrspace(2) global target("dx.Layout", %anon.0, 8, 0), align 1
|
||||
// CHECK: @f7 = external hidden addrspace(2) global float, align 4
|
||||
// CHECK: @f8 = external hidden addrspace(2) global <1 x double>, align 8
|
||||
// CHECK: @f9 = external hidden addrspace(2) global i16, align 2
|
||||
// CHECK: @CBMix.str = private unnamed_addr constant [6 x i8] c"CBMix\00", align 1
|
||||
|
||||
cbuffer CBMix {
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
// CHECK: %"n0::Foo" = type <{ float }>
|
||||
|
||||
// CHECK: @A.cb = global target("dx.CBuffer", target("dx.Layout", %"n0::n1::__cblayout_A", 4, 0))
|
||||
// CHECK: @_ZN2n02n11aE = external addrspace(2) global float, align 4
|
||||
// CHECK: @_ZN2n02n11aE = external hidden addrspace(2) global float, align 4
|
||||
|
||||
// CHECK: @B.cb = global target("dx.CBuffer", target("dx.Layout", %"n0::__cblayout_B", 4, 0))
|
||||
// CHECK: @_ZN2n01aE = external addrspace(2) global float, align 4
|
||||
// CHECK: @_ZN2n01aE = external hidden addrspace(2) global float, align 4
|
||||
|
||||
// CHECK: @C.cb = global target("dx.CBuffer", target("dx.Layout", %"n0::n2::__cblayout_C", 20, 0, 16))
|
||||
// CHECK: @_ZN2n02n21aE = external addrspace(2) global float, align 4
|
||||
// CHECK: external addrspace(2) global target("dx.Layout", %"n0::Foo", 4, 0), align 1
|
||||
// CHECK: @_ZN2n02n21aE = external hidden addrspace(2) global float, align 4
|
||||
// CHECK: external hidden addrspace(2) global target("dx.Layout", %"n0::Foo", 4, 0), align 1
|
||||
|
||||
namespace n0 {
|
||||
struct Foo {
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
// CHECK: %__cblayout_CB_1 = type <{ float, <2 x float> }>
|
||||
|
||||
// CHECK: @CB.cb = global target("dx.CBuffer", target("dx.Layout", %__cblayout_CB, 176, 16, 168, 88))
|
||||
// CHECK: @a = external addrspace(2) global float, align 4
|
||||
// CHECK: @b = external addrspace(2) global double, align 8
|
||||
// CHECK: @c = external addrspace(2) global <2 x i32>, align 8
|
||||
// CHECK: @a = external hidden addrspace(2) global float, align 4
|
||||
// CHECK: @b = external hidden addrspace(2) global double, align 8
|
||||
// CHECK: @c = external hidden addrspace(2) global <2 x i32>, align 8
|
||||
// CHECK: @CB.str = private unnamed_addr constant [3 x i8] c"CB\00", align 1
|
||||
|
||||
cbuffer CB : register(b1, space3) {
|
||||
@@ -18,8 +18,8 @@ cbuffer CB : register(b1, space3) {
|
||||
}
|
||||
|
||||
// CHECK: @CB.cb.1 = global target("dx.CBuffer", target("dx.Layout", %__cblayout_CB_1, 92, 88, 80))
|
||||
// CHECK: @x = external addrspace(2) global float, align 4
|
||||
// CHECK: @y = external addrspace(2) global <2 x float>, align 8
|
||||
// CHECK: @x = external hidden addrspace(2) global float, align 4
|
||||
// CHECK: @y = external hidden addrspace(2) global <2 x float>, align 8
|
||||
|
||||
// Missing packoffset annotation will produce a warning.
|
||||
// Element x will be placed after the element y that has an explicit packoffset.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// CHECK: %__cblayout_A = type <{ float }>
|
||||
|
||||
// CHECK: @A.cb = global target("dx.CBuffer", target("dx.Layout", %__cblayout_A, 4, 0))
|
||||
// CHECK: @a = external addrspace(2) global float, align 4
|
||||
// CHECK: @a = external hidden addrspace(2) global float, align 4
|
||||
// CHECK-DAG: @_ZL1b = internal global float 3.000000e+00, align 4
|
||||
// CHECK-NOT: @B.cb
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ void test1() {
|
||||
do {
|
||||
} while (cond());
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test1v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test1v()
|
||||
// CHECK-SAME: [[A0:#[0-9]+]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -22,7 +22,7 @@ void test2() {
|
||||
foo();
|
||||
} while (cond());
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test2v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test2v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -38,7 +38,7 @@ void test3() {
|
||||
foo();
|
||||
} while (cond());
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test3v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test3v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -57,7 +57,7 @@ void test4() {
|
||||
}
|
||||
} while (cond());
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test4v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test4v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -78,7 +78,7 @@ void test5() {
|
||||
}
|
||||
} while (cond());
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test5v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test5v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
|
||||
@@ -10,7 +10,7 @@ void test1() {
|
||||
foo();
|
||||
}
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test1v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test1v()
|
||||
// CHECK-SAME: [[A0:#[0-9]+]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -23,7 +23,7 @@ void test2() {
|
||||
foo();
|
||||
}
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test2v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test2v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -38,7 +38,7 @@ void test3() {
|
||||
foo();
|
||||
}
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test3v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test3v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -52,7 +52,7 @@ void test4() {
|
||||
foo();
|
||||
}
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test4v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test4v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -67,7 +67,7 @@ void test5() {
|
||||
for (cond();cond2();foo()) {
|
||||
}
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test5v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test5v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -86,7 +86,7 @@ void test6() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test6v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test6v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -112,7 +112,7 @@ void test7() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test7v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test7v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
|
||||
@@ -8,7 +8,7 @@ void test1() {
|
||||
while (cond()) {
|
||||
}
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test1v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test1v()
|
||||
// CHECK-SAME: [[A0:#[0-9]+]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -21,7 +21,7 @@ void test2() {
|
||||
foo();
|
||||
}
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test2v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test2v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -38,7 +38,7 @@ void test3() {
|
||||
foo();
|
||||
}
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test3v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test3v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -59,7 +59,7 @@ void test4() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test4v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test4v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -82,7 +82,7 @@ void test5() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test5v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test5v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
@@ -107,7 +107,7 @@ void test6() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// CHECK-LABEL: define spir_func void @_Z5test6v()
|
||||
// CHECK-LABEL: define hidden spir_func void @_Z5test6v()
|
||||
// CHECK-SAME: [[A0]] {
|
||||
// CHECK: entry:
|
||||
// CHECK: [[T0:%[0-9]+]] = call token @llvm.experimental.convergence.entry()
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
// CHECK: %__cblayout_S = type <{ float }>
|
||||
|
||||
// DXIL-DAG: @"$Globals.cb" = global target("dx.CBuffer", target("dx.Layout", %"__cblayout_$Globals", 20, 0, 4, 16))
|
||||
// DXIL-DAG: @a = external addrspace(2) global float
|
||||
// DXIL-DAG: @g = external addrspace(2) global float
|
||||
// DXIL-DAG: @h = external addrspace(2) global target("dx.Layout", %__cblayout_S, 4, 0), align 4
|
||||
// DXIL-DAG: @a = external hidden addrspace(2) global float
|
||||
// DXIL-DAG: @g = external hidden addrspace(2) global float
|
||||
// DXIL-DAG: @h = external hidden addrspace(2) global target("dx.Layout", %__cblayout_S, 4, 0), align 4
|
||||
|
||||
// SPIRV-DAG: @"$Globals.cb" = global target("spirv.VulkanBuffer", target("spirv.Layout", %"__cblayout_$Globals", 20, 0, 4, 16), 2, 0)
|
||||
// SPIRV-DAG: @a = external addrspace(12) global float
|
||||
// SPIRV-DAG: @g = external addrspace(12) global float
|
||||
// SPIRV-DAG: @h = external addrspace(12) global target("spirv.Layout", %__cblayout_S, 4, 0), align 8
|
||||
// SPIRV-DAG: @a = external hidden addrspace(12) global float
|
||||
// SPIRV-DAG: @g = external hidden addrspace(12) global float
|
||||
// SPIRV-DAG: @h = external hidden addrspace(12) global target("spirv.Layout", %__cblayout_S, 4, 0), align 8
|
||||
|
||||
struct EmptyStruct {
|
||||
};
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
// CHECK-SAME: target("dx.Layout", %S, 8, 0) }>
|
||||
// CHECK: %S = type <{ <2 x float> }>
|
||||
|
||||
// CHECK-DAG: @b = external addrspace(2) global float, align 4
|
||||
// CHECK-DAG: @d = external addrspace(2) global <4 x i32>, align 16
|
||||
// CHECK-DAG: @b = external hidden addrspace(2) global float, align 4
|
||||
// CHECK-DAG: @d = external hidden addrspace(2) global <4 x i32>, align 16
|
||||
// CHECK-DAG: @"$Globals.cb" = global target("dx.CBuffer",
|
||||
// CHECK-DAG-SAME: target("dx.Layout", %"__cblayout_$Globals", 144, 120, 16, 32, 64, 128, 112))
|
||||
// CHECK-DAG: @a = external addrspace(2) global i32, align 4
|
||||
// CHECK-DAG: @c = external addrspace(2) global [4 x double], align 8
|
||||
// CHECK-DAG: @e = external addrspace(2) global <4 x float>, align 16
|
||||
// CHECK-DAG: @s = external addrspace(2) global target("dx.Layout", %S, 8, 0), align 1
|
||||
// CHECK-DAG: @a = external hidden addrspace(2) global i32, align 4
|
||||
// CHECK-DAG: @c = external hidden addrspace(2) global [4 x double], align 8
|
||||
// CHECK-DAG: @e = external hidden addrspace(2) global <4 x float>, align 16
|
||||
// CHECK-DAG: @s = external hidden addrspace(2) global target("dx.Layout", %S, 8, 0), align 1
|
||||
|
||||
struct S {
|
||||
float2 v;
|
||||
|
||||
@@ -5,17 +5,15 @@
|
||||
export void f1() {
|
||||
}
|
||||
|
||||
// CHECK: define void @_ZN11MyNamespace2f2Ev() [[Attr]]
|
||||
// CHECK: define void @_ZN11MyNamespace2f2Ev()
|
||||
namespace MyNamespace {
|
||||
export void f2() {
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
// CHECK: define void @_Z2f3v() [[Attr]]
|
||||
// CHECK: define void @_Z2f4v() [[Attr]]
|
||||
// CHECK: define void @_Z2f3v()
|
||||
// CHECK: define void @_Z2f4v()
|
||||
void f3() {}
|
||||
void f4() {}
|
||||
}
|
||||
|
||||
// CHECK: attributes [[Attr]] = { {{.*}} "hlsl.export" {{.*}} }
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
|
||||
|
||||
// Make sure groupshared translated into address space 3.
|
||||
// CHECK:@a = addrspace(3) global [10 x float]
|
||||
// CHECK:@a = hidden addrspace(3) global [10 x float]
|
||||
|
||||
groupshared float a[10];
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ struct Node {
|
||||
};
|
||||
|
||||
// CHECK: Function Attrs:{{.*}}norecurse
|
||||
// CHECK: define noundef i32 @_Z4FindA100_4Nodej(ptr noundef byval([100 x %struct.Node]) align 1 %SortedTree, i32 noundef %key) [[IntAttr:\#[0-9]+]]
|
||||
// CHECK: define hidden noundef i32 @_Z4FindA100_4Nodej(ptr noundef byval([100 x %struct.Node]) align 1 %SortedTree, i32 noundef %key) [[Attr:\#[0-9]+]]
|
||||
// CHECK: ret i32
|
||||
// Find and return value corresponding to key in the SortedTree
|
||||
uint Find(Node SortedTree[MAX], uint key) {
|
||||
@@ -31,7 +31,7 @@ uint Find(Node SortedTree[MAX], uint key) {
|
||||
}
|
||||
|
||||
// CHECK: Function Attrs:{{.*}}norecurse
|
||||
// CHECK: define noundef i1 @_Z8InitTreeA100_4NodeN4hlsl8RWBufferIDv4_jEEj(ptr noundef byval([100 x %struct.Node]) align 1 %tree, ptr noundef byval(%"class.hlsl::RWBuffer") align 4 %encodedTree, i32 noundef %maxDepth) [[ExtAttr:\#[0-9]+]]
|
||||
// CHECK: define noundef i1 @_Z8InitTreeA100_4NodeN4hlsl8RWBufferIDv4_jEEj(ptr noundef byval([100 x %struct.Node]) align 1 %tree, ptr noundef byval(%"class.hlsl::RWBuffer") align 4 %encodedTree, i32 noundef %maxDepth) [[Attr:\#[0-9]+]]
|
||||
// CHECK: ret i1
|
||||
// Initialize tree with given buffer
|
||||
// Imagine the inout works
|
||||
@@ -52,7 +52,7 @@ RWBuffer<uint4> gTree;
|
||||
|
||||
// Mangled entry points are internal
|
||||
// CHECK: Function Attrs:{{.*}}norecurse
|
||||
// CHECK: define internal void @_Z4mainj(i32 noundef %GI) [[IntAttr]]
|
||||
// CHECK: define internal void @_Z4mainj(i32 noundef %GI) [[Attr]]
|
||||
// CHECK: ret void
|
||||
|
||||
// Canonical entry points are external and shader attributed
|
||||
@@ -71,7 +71,7 @@ void main(uint GI : SV_GroupIndex) {
|
||||
|
||||
// Mangled entry points are internal
|
||||
// CHECK: Function Attrs:{{.*}}norecurse
|
||||
// CHECK: define internal void @_Z11defaultMainv() [[IntAttr]]
|
||||
// CHECK: define internal void @_Z11defaultMainv() [[Attr]]
|
||||
// CHECK: ret void
|
||||
|
||||
// Canonical entry points are external and shader attributed
|
||||
@@ -88,6 +88,5 @@ void defaultMain() {
|
||||
needle = Find(haystack, needle);
|
||||
}
|
||||
|
||||
// CHECK: attributes [[IntAttr]] = {{.*}} norecurse
|
||||
// CHECK: attributes [[ExtAttr]] = {{.*}} norecurse
|
||||
// CHECK: attributes [[Attr]] = {{.*}} norecurse
|
||||
// CHECK: attributes [[EntryAttr]] = {{.*}} norecurse
|
||||
|
||||
@@ -15,7 +15,7 @@ float nums[MAX];
|
||||
|
||||
// Verify that all functions have the alwaysinline attribute
|
||||
// NOINLINE: Function Attrs: alwaysinline
|
||||
// NOINLINE: define void @_Z4swapA100_jjj(ptr noundef byval([100 x i32]) align 4 %Buf, i32 noundef %ix1, i32 noundef %ix2) [[IntAttr:\#[0-9]+]]
|
||||
// NOINLINE: define hidden void @_Z4swapA100_jjj(ptr noundef byval([100 x i32]) align 4 %Buf, i32 noundef %ix1, i32 noundef %ix2) [[Attr:\#[0-9]+]]
|
||||
// NOINLINE: ret void
|
||||
// Swap the values of Buf at indices ix1 and ix2
|
||||
void swap(unsigned Buf[MAX], unsigned ix1, unsigned ix2) {
|
||||
@@ -25,7 +25,7 @@ void swap(unsigned Buf[MAX], unsigned ix1, unsigned ix2) {
|
||||
}
|
||||
|
||||
// NOINLINE: Function Attrs: alwaysinline
|
||||
// NOINLINE: define void @_Z10BubbleSortA100_jj(ptr noundef byval([100 x i32]) align 4 %Buf, i32 noundef %size) [[IntAttr]]
|
||||
// NOINLINE: define hidden void @_Z10BubbleSortA100_jj(ptr noundef byval([100 x i32]) align 4 %Buf, i32 noundef %size) [[Attr]]
|
||||
// NOINLINE: ret void
|
||||
// Inefficiently sort Buf in place
|
||||
void BubbleSort(unsigned Buf[MAX], unsigned size) {
|
||||
@@ -43,7 +43,7 @@ void BubbleSort(unsigned Buf[MAX], unsigned size) {
|
||||
|
||||
// Note ExtAttr is the inlined export set of attribs
|
||||
// CHECK: Function Attrs: alwaysinline
|
||||
// CHECK: define noundef i32 @_Z11RemoveDupesA100_jj(ptr {{[a-z_ ]*}}noundef byval([100 x i32]) align 4 {{.*}}%Buf, i32 noundef %size) {{[a-z_ ]*}}[[ExtAttr:\#[0-9]+]]
|
||||
// CHECK: define noundef i32 @_Z11RemoveDupesA100_jj(ptr {{[a-z_ ]*}}noundef byval([100 x i32]) align 4 {{.*}}%Buf, i32 noundef %size) {{[a-z_ ]*}}[[Attr:\#[0-9]+]]
|
||||
// CHECK: ret i32
|
||||
// Sort Buf and remove any duplicate values
|
||||
// returns the number of values left
|
||||
@@ -65,9 +65,9 @@ RWBuffer<unsigned> Indices;
|
||||
|
||||
// The mangled version of main only remains without inlining
|
||||
// because it has internal linkage from the start
|
||||
// Note main functions get the norecurse attrib, which IntAttr reflects
|
||||
// Note main functions get the alwaysinline attrib, which Attr reflects
|
||||
// NOINLINE: Function Attrs: alwaysinline
|
||||
// NOINLINE: define internal void @_Z4mainj(i32 noundef %GI) [[IntAttr]]
|
||||
// NOINLINE: define internal void @_Z4mainj(i32 noundef %GI) [[Attr]]
|
||||
// NOINLINE: ret void
|
||||
|
||||
// The unmangled version is not inlined, EntryAttr reflects that
|
||||
@@ -93,9 +93,9 @@ void main(unsigned int GI : SV_GroupIndex) {
|
||||
|
||||
// The mangled version of main only remains without inlining
|
||||
// because it has internal linkage from the start
|
||||
// Note main functions get the norecurse attrib, which IntAttr reflects
|
||||
// Note main functions get the alwaysinline attrib, which Attr reflects
|
||||
// NOINLINE: Function Attrs: alwaysinline
|
||||
// NOINLINE: define internal void @_Z6main10v() [[IntAttr]]
|
||||
// NOINLINE: define internal void @_Z6main10v() [[Attr]]
|
||||
// NOINLINE: ret void
|
||||
|
||||
// The unmangled version is not inlined, EntryAttr reflects that
|
||||
@@ -113,6 +113,5 @@ void main10() {
|
||||
main(10);
|
||||
}
|
||||
|
||||
// NOINLINE: attributes [[IntAttr]] = {{.*}} alwaysinline
|
||||
// CHECK: attributes [[ExtAttr]] = {{.*}} alwaysinline
|
||||
// CHECK: attributes [[Attr]] = {{.*}} alwaysinline
|
||||
// CHECK: attributes [[EntryAttr]] = {{.*}} noinline
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user