forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
301 additions
and
3,417 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
tools/clang/test/HLSLFileCheck/dxil/intrinsics/launch_types_broadcast.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
; RUN: %dxv %s | ||
|
||
; There should be no errors! | ||
|
||
target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64" | ||
target triple = "dxil-ms-dx" | ||
|
||
define void @entry2() { | ||
%1 = call i32 @dx.op.threadId.i32(i32 93, i32 1) | ||
%2 = call i32 @dx.op.groupId.i32(i32 94, i32 2) | ||
%3 = call i32 @dx.op.threadIdInGroup.i32(i32 95, i32 1) | ||
%4 = call i32 @dx.op.flattenedThreadIdInGroup.i32(i32 96) | ||
ret void | ||
} | ||
|
||
!llvm.ident = !{!0} | ||
!dx.version = !{!1} | ||
!dx.valver = !{!2} | ||
!dx.shaderModel = !{!3} | ||
!dx.typeAnnotations = !{!4} | ||
!dx.entryPoints = !{!8, !9} | ||
|
||
!0 = !{!"dxc(private) 1.7.0.14317 (main, e3c311409675)"} | ||
!1 = !{i32 1, i32 3} | ||
!2 = !{i32 1, i32 8} | ||
!3 = !{!"lib", i32 6, i32 3} | ||
!4 = !{i32 1, void ()* @entry2, !5} | ||
!5 = !{!6} | ||
!6 = !{i32 0, !7, !7} | ||
!7 = !{} | ||
!8 = !{null, !"", null, null, null} | ||
!9 = !{void ()* @entry2, !"entry2", null, null, !10} | ||
!10 = !{i32 8, i32 15, i32 13, i32 1, i32 15, !11, i32 16, i32 -1, i32 18, !12, i32 4, !12, i32 5, !13} | ||
!11 = !{!"entry2", i32 0} | ||
!12 = !{i32 1, i32 1, i32 1} | ||
!13 = !{i32 0} | ||
|
||
; Function Attrs: nounwind readnone | ||
declare i32 @dx.op.threadId.i32(i32, i32) #1 | ||
|
||
; Function Attrs: nounwind readnone | ||
declare i32 @dx.op.groupId.i32(i32, i32) #1 | ||
|
||
; Function Attrs: nounwind readnone | ||
declare i32 @dx.op.threadIdInGroup.i32(i32, i32) #0 | ||
|
||
; Function Attrs: nounwind readnone | ||
declare i32 @dx.op.flattenedThreadIdInGroup.i32(i32) #0 | ||
|
||
; this file comes from compiling launch_types.hlsl with: |
53 changes: 53 additions & 0 deletions
53
tools/clang/test/HLSLFileCheck/dxil/intrinsics/launch_types_coalescing.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
; RUN: %dxv %s | FileCheck %s | ||
|
||
target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64" | ||
target triple = "dxil-ms-dx" | ||
|
||
; CHECK: Function: entry3: error: Call to DXIL intrinsic ThreadId is not allowed in node shader launch type Coalescing | ||
; CHECK: note: at '%1 = call i32 @dx.op.threadId.i32(i32 93, i32 1)' in block '#0' of function 'entry3'. | ||
; CHECK: Function: entry3: error: Call to DXIL intrinsic GroupId is not allowed in node shader launch type Coalescing | ||
; CHECK: note: at '%2 = call i32 @dx.op.groupId.i32(i32 94, i32 2)' in block '#0' of function 'entry3'. | ||
|
||
define void @entry3() { | ||
%1 = call i32 @dx.op.threadId.i32(i32 93, i32 1) | ||
%2 = call i32 @dx.op.groupId.i32(i32 94, i32 2) | ||
%3 = call i32 @dx.op.threadIdInGroup.i32(i32 95, i32 1) | ||
%4 = call i32 @dx.op.flattenedThreadIdInGroup.i32(i32 96) | ||
ret void | ||
} | ||
|
||
!llvm.ident = !{!0} | ||
!dx.version = !{!1} | ||
!dx.valver = !{!2} | ||
!dx.shaderModel = !{!3} | ||
!dx.typeAnnotations = !{!4} | ||
!dx.entryPoints = !{!8, !9} | ||
|
||
!0 = !{!"dxc(private) 1.7.0.14317 (main, e3c311409675)"} | ||
!1 = !{i32 1, i32 3} | ||
!2 = !{i32 1, i32 8} | ||
!3 = !{!"lib", i32 6, i32 3} | ||
!4 = !{i32 1, void ()* @entry3, !5} | ||
!5 = !{!6} | ||
!6 = !{i32 0, !7, !7} | ||
!7 = !{} | ||
!8 = !{null, !"", null, null, null} | ||
!9 = !{void ()* @entry3, !"entry3", null, null, !10} | ||
!10 = !{i32 8, i32 15, i32 13, i32 2, i32 15, !11, i32 16, i32 -1, i32 4, !12, i32 5, !13} | ||
!11 = !{!"entry3", i32 0} | ||
!12 = !{i32 1, i32 1, i32 1} | ||
!13 = !{i32 0} | ||
|
||
; Function Attrs: nounwind readnone | ||
declare i32 @dx.op.threadId.i32(i32, i32) #1 | ||
|
||
; Function Attrs: nounwind readnone | ||
declare i32 @dx.op.groupId.i32(i32, i32) #1 | ||
|
||
; Function Attrs: nounwind readnone | ||
declare i32 @dx.op.threadIdInGroup.i32(i32, i32) #0 | ||
|
||
; Function Attrs: nounwind readnone | ||
declare i32 @dx.op.flattenedThreadIdInGroup.i32(i32) #0 | ||
|
||
; this file comes from compiling launch_types.hlsl with: |
57 changes: 57 additions & 0 deletions
57
tools/clang/test/HLSLFileCheck/dxil/intrinsics/launch_types_thread.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
; RUN: %dxv %s | FileCheck %s | ||
|
||
target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64" | ||
target triple = "dxil-ms-dx" | ||
|
||
; CHECK: Function: entry: error: Call to DXIL intrinsic ThreadId is not allowed in node shader launch type Thread | ||
; CHECK: note: at '%1 = call i32 @dx.op.threadId.i32(i32 93, i32 1)' in block '#0' of function 'entry'. | ||
; CHECK: Function: entry: error: Call to DXIL intrinsic GroupId is not allowed in node shader launch type Thread | ||
; CHECK: note: at '%2 = call i32 @dx.op.groupId.i32(i32 94, i32 2)' in block '#0' of function 'entry'. | ||
; CHECK: Function: entry: error: Call to DXIL intrinsic ThreadIdInGroup is not allowed in node shader launch type Thread | ||
; CHECK: note: at '%3 = call i32 @dx.op.threadIdInGroup.i32(i32 95, i32 1)' in block '#0' of function 'entry'. | ||
; CHECK: Function: entry: error: Call to DXIL intrinsic FlattenedThreadIdInGroup is not allowed in node shader launch type Thread | ||
; CHECK: note: at '%4 = call i32 @dx.op.flattenedThreadIdInGroup.i32(i32 96)' in block '#0' of function 'entry'. | ||
|
||
define void @entry() { | ||
%1 = call i32 @dx.op.threadId.i32(i32 93, i32 1) | ||
%2 = call i32 @dx.op.groupId.i32(i32 94, i32 2) | ||
%3 = call i32 @dx.op.threadIdInGroup.i32(i32 95, i32 1) | ||
%4 = call i32 @dx.op.flattenedThreadIdInGroup.i32(i32 96) | ||
ret void | ||
} | ||
|
||
!llvm.ident = !{!0} | ||
!dx.version = !{!1} | ||
!dx.valver = !{!2} | ||
!dx.shaderModel = !{!3} | ||
!dx.typeAnnotations = !{!4} | ||
!dx.entryPoints = !{!8, !9} | ||
|
||
!0 = !{!"dxc(private) 1.7.0.14317 (main, e3c311409675)"} | ||
!1 = !{i32 1, i32 3} | ||
!2 = !{i32 1, i32 8} | ||
!3 = !{!"lib", i32 6, i32 3} | ||
!4 = !{i32 1, void ()* @entry, !5} | ||
!5 = !{!6} | ||
!6 = !{i32 0, !7, !7} | ||
!7 = !{} | ||
!8 = !{null, !"", null, null, null} | ||
!9 = !{void ()* @entry, !"entry", null, null, !10} | ||
!10 = !{i32 8, i32 15, i32 13, i32 3, i32 15, !11, i32 16, i32 -1, i32 4, !12, i32 5, !13} | ||
!11 = !{!"entry", i32 0} | ||
!12 = !{i32 1, i32 1, i32 1} | ||
!13 = !{i32 0} | ||
|
||
; Function Attrs: nounwind readnone | ||
declare i32 @dx.op.threadId.i32(i32, i32) #1 | ||
|
||
; Function Attrs: nounwind readnone | ||
declare i32 @dx.op.groupId.i32(i32, i32) #1 | ||
|
||
; Function Attrs: nounwind readnone | ||
declare i32 @dx.op.threadIdInGroup.i32(i32, i32) #0 | ||
|
||
; Function Attrs: nounwind readnone | ||
declare i32 @dx.op.flattenedThreadIdInGroup.i32(i32) #0 | ||
|
||
; this file comes from compiling launch_types.hlsl with: |
Oops, something went wrong.