From c5c3a34221aa3509655a1360b4c7e7733c142833 Mon Sep 17 00:00:00 2001 From: Tim Renouf Date: Tue, 6 Aug 2019 14:30:19 +0000 Subject: [PATCH] [StructurizeCFG] Enable -structurizecfg-relaxed-uniform-regions by default 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 | 2 +- test/CodeGen/AMDGPU/control-flow-optnone.ll | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Transforms/Scalar/StructurizeCFG.cpp b/lib/Transforms/Scalar/StructurizeCFG.cpp index e5400676c7e..9791cf41f62 100644 --- a/lib/Transforms/Scalar/StructurizeCFG.cpp +++ b/lib/Transforms/Scalar/StructurizeCFG.cpp @@ -65,7 +65,7 @@ static cl::opt ForceSkipUniformRegions( static cl::opt 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. diff --git a/test/CodeGen/AMDGPU/control-flow-optnone.ll b/test/CodeGen/AMDGPU/control-flow-optnone.ll index 2122af62735..8dda45fee0b 100644 --- a/test/CodeGen/AMDGPU/control-flow-optnone.ll +++ b/test/CodeGen/AMDGPU/control-flow-optnone.ll @@ -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: -- 2.40.0