[PATCH] D40546: StructurizeCFG: Test for branch divergence correctly

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 12:00:26 PST 2017


arsenm added inline comments.


================
Comment at: lib/Transforms/Scalar/StructurizeCFG.cpp:253
+      : RegionPass(ID),
+        SkipUniformRegions(SkipUniformRegions || ForceSkipUniformRegions) {
     initializeStructurizeCFGPass(*PassRegistry::getPassRegistry());
----------------
I think the flag should override the pass argument if explicitly specified. I think other passes do something like if .getNumOccurrences() > 0 use the flag ...


================
Comment at: test/Transforms/StructurizeCFG/uniform-regions.ll:1
+; RUN: opt -mtriple=amdgcn-- -S -o - -structurizecfg -structurizecfg-skip-uniform-regions < %s | FileCheck %s
+
----------------
The -mtriple should be dropped. If it's needed, you should create an AMDGPU specific test subdirectory in StructurizeCFG


https://reviews.llvm.org/D40546





More information about the llvm-commits mailing list