diff --git a/llvm/lib/Target/R600/AMDGPU.td b/llvm/lib/Target/R600/AMDGPU.td index 37ff6b143a03..182235b27c48 100644 --- a/llvm/lib/Target/R600/AMDGPU.td +++ b/llvm/lib/Target/R600/AMDGPU.td @@ -21,10 +21,10 @@ def FeatureDumpCode : SubtargetFeature <"DumpCode", "true", "Dump MachineInstrs in the CodeEmitter">; -def FeatureIRStructurizer : SubtargetFeature <"enable-irstructurizer", +def FeatureIRStructurizer : SubtargetFeature <"disable-irstructurizer", "EnableIRStructurizer", - "true", - "Enable IR Structurizer">; + "false", + "Disable IR Structurizer">; // Target features diff --git a/llvm/lib/Target/R600/AMDGPUSubtarget.cpp b/llvm/lib/Target/R600/AMDGPUSubtarget.cpp index 4e97e6e83bb8..061793a68b9d 100644 --- a/llvm/lib/Target/R600/AMDGPUSubtarget.cpp +++ b/llvm/lib/Target/R600/AMDGPUSubtarget.cpp @@ -36,7 +36,7 @@ AMDGPUSubtarget::AMDGPUSubtarget(StringRef TT, StringRef CPU, StringRef FS) : Gen = AMDGPUSubtarget::R600; FP64 = false; CaymanISA = false; - EnableIRStructurizer = false; + EnableIRStructurizer = true; EnableIfCvt = true; ParseSubtargetFeatures(GPU, FS); DevName = GPU; diff --git a/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp b/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp index 9186c9df3abf..bc4f5d720ae2 100644 --- a/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp +++ b/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp @@ -125,8 +125,7 @@ bool AMDGPUPassConfig::addPreISel() { const AMDGPUSubtarget &ST = TM->getSubtarget(); addPass(createFlattenCFGPass()); - if (ST.IsIRStructurizerEnabled() || - ST.getGeneration() > AMDGPUSubtarget::NORTHERN_ISLANDS) + if (ST.IsIRStructurizerEnabled()) addPass(createStructurizeCFGPass()); if (ST.getGeneration() > AMDGPUSubtarget::NORTHERN_ISLANDS) { addPass(createSinkingPass()); diff --git a/llvm/test/CodeGen/R600/jump-address.ll b/llvm/test/CodeGen/R600/jump-address.ll index 26c298b9d819..ae9c8bba4fd6 100644 --- a/llvm/test/CodeGen/R600/jump-address.ll +++ b/llvm/test/CodeGen/R600/jump-address.ll @@ -1,6 +1,6 @@ ;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s -; CHECK: JUMP @5 +; CHECK: JUMP @3 ; CHECK: EXPORT ; CHECK-NOT: EXPORT diff --git a/llvm/test/CodeGen/R600/predicates.ll b/llvm/test/CodeGen/R600/predicates.ll index 0d3eeef26307..902508ff9e05 100644 --- a/llvm/test/CodeGen/R600/predicates.ll +++ b/llvm/test/CodeGen/R600/predicates.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s +; RUN: llc < %s -march=r600 -mattr=disable-irstructurizer -mcpu=redwood | FileCheck %s ; These tests make sure the compiler is optimizing branches using predicates ; when it is legal to do so. diff --git a/llvm/test/CodeGen/R600/structurize.ll b/llvm/test/CodeGen/R600/structurize.ll index b95561943c79..c2acd938ad05 100644 --- a/llvm/test/CodeGen/R600/structurize.ll +++ b/llvm/test/CodeGen/R600/structurize.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s +; RUN: llc < %s -march=r600 -mcpu=redwood -mattr=disable-irstructurizer | FileCheck %s ; Test case for a crash in the AMDILCFGStructurizer from a CFG like this: ; ; entry