Skip to content

Commit

Permalink
Change use of Constant Propagation Pass to SCCPPass.
Browse files Browse the repository at this point in the history
Constant propagation pass has been removed in upstream LLVM,
in favour of focusing support on SCCPPass.
  • Loading branch information
perlfu committed Aug 4, 2020
1 parent a41cd45 commit 3b4abbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion llpc/lower/llpcSpirvLower.cpp
Expand Up @@ -189,7 +189,7 @@ void SpirvLower::addPasses(Context *context, ShaderStage stage, legacy::PassMana
passMgr.add(createSROAPass());
passMgr.add(createEarlyCSEPass());
passMgr.add(createCFGSimplificationPass());
passMgr.add(createIPConstantPropagationPass());
passMgr.add(createIPSCCPPass());

// Lower SPIR-V floating point optimisation
passMgr.add(createSpirvLowerMathFloatOp());
Expand Down
Expand Up @@ -44,7 +44,7 @@ void main()
; RUN: amdllpc -enable-load-scalarizer=false -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST-COUNT-4: getelementptr [4 x { i8, <2 x i8>, <3 x i8>, <4 x i8> }], [4 x { i8, <2 x i8>, <3 x i8>, <4 x i8> }] addrspace(3)* @{{.*}}, i32 0, i32 {{%[0-9]+}}, i32 {{[0-3]}}
; SHADERTEST-COUNT-4: getelementptr inbounds ([4 x { i8, <2 x i8>, <3 x i8>, <4 x i8> }], [4 x { i8, <2 x i8>, <3 x i8>, <4 x i8> }] addrspace(3)* @{{.*}}, i32 0, i32 {{[0-9]+}}, i32 {{[0-3]}})
; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results
; SHADERTEST: load i8, i8 addrspace(3)* getelementptr inbounds ([4 x { i8, <2 x i8>, <3 x i8>, <4 x i8> }], [4 x { i8, <2 x i8>, <3 x i8>, <4 x i8> }] addrspace(3)* @{{.*}}, i32 0, i32 0, i32 0), align 16
; SHADERTEST: store i8 %{{[0-9]*}}, i8 addrspace(3)* getelementptr inbounds ([4 x { i8, <2 x i8>, <3 x i8>, <4 x i8> }], [4 x { i8, <2 x i8>, <3 x i8>, <4 x i8> }] addrspace(3)* @{{.*}}, i32 0, i32 0, i32 0), align 16
Expand Down

0 comments on commit 3b4abbb

Please sign in to comment.