]> granicus.if.org Git - llvm/commitdiff
[StructurizeCFG] Enable -structurizecfg-relaxed-uniform-regions by default
authorTim Renouf <tpr.llvm@botech.co.uk>
Tue, 6 Aug 2019 14:30:19 +0000 (14:30 +0000)
committerTim Renouf <tpr.llvm@botech.co.uk>
Tue, 6 Aug 2019 14:30:19 +0000 (14:30 +0000)
D62198 introduced an option to relax the checks for
hasOnlyUniformBranches. This commit turns the option on by default, for
better code generation in some cases in AMDGPU.

Differential Revision: https://reviews.llvm.org/D63198

Change-Id: I9cbff002a1e74d3b7eb96b4192dc8129936d537d

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368042 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/StructurizeCFG.cpp
test/CodeGen/AMDGPU/control-flow-optnone.ll

index e5400676c7e8b48365a661c67203aac8cb233994..9791cf41f6212fb86f0d96672e9d903b7d723e98 100644 (file)
@@ -65,7 +65,7 @@ static cl::opt<bool> ForceSkipUniformRegions(
 static cl::opt<bool>
     RelaxedUniformRegions("structurizecfg-relaxed-uniform-regions", cl::Hidden,
                           cl::desc("Allow relaxed uniform region checks"),
-                          cl::init(false));
+                          cl::init(true));
 
 // Definition of the complex types used in this pass.
 
index 2122af62735fe4eeb9bbdbc4a69000c6e95d6ffa..8dda45fee0bf3dc41671aa5032e955eeb702e512 100644 (file)
@@ -15,8 +15,8 @@
 ; GCN: s_mov_b64 exec
 
 ; GCN: s_or_b64 exec, exec
-; GCN: v_cmp_eq_u32
-; GCN: s_cbranch_vccnz
+; GCN: s_cmp_eq_u32
+; GCN: s_cbranch_scc1
 ; GCN-NEXT: s_branch
 define amdgpu_kernel void @copytoreg_divergent_brcond(i32 %arg, i32 %arg1, i32 %arg2) #0 {
 bb: