File tree Expand file tree Collapse file tree 21 files changed +27
-29
lines changed Expand file tree Collapse file tree 21 files changed +27
-29
lines changed Original file line number Diff line number Diff line change 33
33
34
34
using namespace llvm ;
35
35
36
+ class DXILIntrinsicExpansionLegacy : public ModulePass {
37
+
38
+ public:
39
+ bool runOnModule (Module &M) override ;
40
+ DXILIntrinsicExpansionLegacy () : ModulePass(ID) {}
41
+
42
+ void getAnalysisUsage (AnalysisUsage &AU) const override ;
43
+ static char ID; // Pass identification.
44
+ };
45
+
36
46
static bool isIntrinsicExpansion (Function &F) {
37
47
switch (F.getIntrinsicID ()) {
38
48
case Intrinsic::abs:
Original file line number Diff line number Diff line change @@ -19,16 +19,6 @@ class DXILIntrinsicExpansion : public PassInfoMixin<DXILIntrinsicExpansion> {
19
19
public:
20
20
PreservedAnalyses run (Module &M, ModuleAnalysisManager &);
21
21
};
22
-
23
- class DXILIntrinsicExpansionLegacy : public ModulePass {
24
-
25
- public:
26
- bool runOnModule (Module &M) override ;
27
- DXILIntrinsicExpansionLegacy () : ModulePass(ID) {}
28
-
29
- void getAnalysisUsage (AnalysisUsage &AU) const override ;
30
- static char ID; // Pass identification.
31
- };
32
22
} // namespace llvm
33
23
34
24
#endif // LLVM_TARGET_DIRECTX_DXILINTRINSICEXPANSION_H
Original file line number Diff line number Diff line change @@ -525,7 +525,6 @@ class DXILOpLoweringLegacy : public ModulePass {
525
525
526
526
static char ID; // Pass identification.
527
527
void getAnalysisUsage (llvm::AnalysisUsage &AU) const override {
528
- AU.addRequired <DXILIntrinsicExpansionLegacy>();
529
528
AU.addRequired <DXILResourceWrapperPass>();
530
529
AU.addPreserved <DXILResourceWrapperPass>();
531
530
}
Original file line number Diff line number Diff line change 1
1
; RUN: opt -S -dxil-intrinsic-expansion -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
2
- ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
2
+ ; RUN: opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
3
3
4
4
; Make sure dxil operation function calls for abs are generated for int16_t/int/int64_t.
5
5
Original file line number Diff line number Diff line change 1
- ; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s
1
+ ; RUN: not opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s
2
2
3
3
; DXIL operation atan does not support double overload type
4
4
; CHECK: in function atan2_double
Original file line number Diff line number Diff line change 1
- ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
1
+ ; RUN: opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
2
2
3
3
; Make sure dxil operation function calls for clamp/uclamp are generated for half/float/double/i16/i32/i64.
4
4
Original file line number Diff line number Diff line change 1
- ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
1
+ ; RUN: opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
2
2
3
3
; Make sure dxil operation function calls for exp are generated for float and half.
4
4
Original file line number Diff line number Diff line change 1
1
; RUN: opt -S -dxil-intrinsic-expansion -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
2
- ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
2
+ ; RUN: opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
3
3
4
4
; Make sure dxil operation function calls for dot are generated for float type vectors.
5
5
Original file line number Diff line number Diff line change 1
1
; RUN: opt -S -dxil-intrinsic-expansion -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
2
- ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
2
+ ; RUN: opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
3
3
4
4
; Make sure dxil operation function calls for dot are generated for int/uint vectors.
5
5
Original file line number Diff line number Diff line change 1
1
; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
2
- ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
2
+ ; RUN: opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
3
3
4
4
; Make sure dxil operation function calls for length are generated for half/float.
5
5
Original file line number Diff line number Diff line change 1
- ; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s
1
+ ; RUN: not opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s
2
2
3
3
; DXIL operation length does not support double overload type
4
4
; CHECK: Cannot create Sqrt operation: Invalid overload type
Original file line number Diff line number Diff line change 1
- ; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s
1
+ ; RUN: not opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s
2
2
3
3
; DXIL operation length does not support 1-element vector types.
4
4
; CHECK: LLVM ERROR: Invalid input type for length intrinsic
Original file line number Diff line number Diff line change 1
- ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.0-library < %s | FileCheck %s
1
+ ; RUN: opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.0-library < %s | FileCheck %s
2
2
3
3
; Make sure dxil operation function calls for lerp are generated for float and half.
4
4
Original file line number Diff line number Diff line change 12
12
; CHECK-NEXT: FunctionPass Manager
13
13
; CHECK-NEXT: Dominator Tree Construction
14
14
; CHECK-NEXT: Scalarize vector operations
15
- ; CHECK-NEXT: DXIL Intrinsic Expansion
16
15
; CHECK-NEXT: DXIL Resource analysis
17
16
; CHECK-NEXT: DXIL Op Lowering
18
17
; CHECK-NEXT: DXIL Finalize Linkage
Original file line number Diff line number Diff line change 1
1
; RUN: opt -S -dxil-intrinsic-expansion -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
2
- ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
2
+ ; RUN: opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
3
3
4
4
; Make sure dxil operation function calls for log are generated.
5
5
Original file line number Diff line number Diff line change 1
1
; RUN: opt -S -dxil-intrinsic-expansion -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
2
- ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
2
+ ; RUN: opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
3
3
4
4
; Make sure dxil operation function calls for log10 are generated.
5
5
Original file line number Diff line number Diff line change 1
1
; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
2
- ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
2
+ ; RUN: opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
3
3
4
4
; Make sure dxil operation function calls for normalize are generated for half/float.
5
5
Original file line number Diff line number Diff line change 1
- ; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s
1
+ ; RUN: not opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s
2
2
3
3
; DXIL operation normalize does not support double overload type
4
4
; CHECK: Cannot create Dot2 operation: Invalid overload type
Original file line number Diff line number Diff line change 1
1
; RUN: opt -S -dxil-intrinsic-expansion -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
2
- ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
2
+ ; RUN: opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
3
3
4
4
; Make sure dxil operation function calls for pow are generated.
5
5
Original file line number Diff line number Diff line change 1
1
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
2
- ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
2
+ ; RUN: opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
3
3
4
4
5
5
define noundef i32 @sign_half (half noundef %a ) {
Original file line number Diff line number Diff line change 1
1
; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefix=CHECK
2
- ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s --check-prefix=CHECK
2
+ ; RUN: opt -S -dxil-intrinsic-expansion -dxil- op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s --check-prefix=CHECK
3
3
4
4
; Make sure dxil operation function calls for step are generated for half/float.
5
5
You can’t perform that action at this time.
0 commit comments