diff --git a/llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp b/llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp --- a/llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp +++ b/llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp @@ -124,6 +124,7 @@ disablePass(&PatchableFunctionID); disablePass(&ShrinkWrapID); disablePass(&LiveDebugValuesID); + disablePass(&MachineLateInstrsCleanupID); // Do not work with OpPhi. disablePass(&BranchFolderPassID); diff --git a/llvm/test/CodeGen/SPIRV/instructions/atomic.ll b/llvm/test/CodeGen/SPIRV/instructions/atomic.ll --- a/llvm/test/CodeGen/SPIRV/instructions/atomic.ll +++ b/llvm/test/CodeGen/SPIRV/instructions/atomic.ll @@ -1,4 +1,4 @@ -; RUN: llc -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s ; CHECK-DAG: OpName [[ADD:%.*]] "test_add" ; CHECK-DAG: OpName [[SUB:%.*]] "test_sub" diff --git a/llvm/test/CodeGen/SPIRV/instructions/atomic_acqrel.ll b/llvm/test/CodeGen/SPIRV/instructions/atomic_acqrel.ll --- a/llvm/test/CodeGen/SPIRV/instructions/atomic_acqrel.ll +++ b/llvm/test/CodeGen/SPIRV/instructions/atomic_acqrel.ll @@ -1,4 +1,4 @@ -; RUN: llc -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s ; CHECK-DAG: OpName [[ADD:%.*]] "test_add" ; CHECK-DAG: OpName [[SUB:%.*]] "test_sub" diff --git a/llvm/test/CodeGen/SPIRV/instructions/atomic_seq.ll b/llvm/test/CodeGen/SPIRV/instructions/atomic_seq.ll --- a/llvm/test/CodeGen/SPIRV/instructions/atomic_seq.ll +++ b/llvm/test/CodeGen/SPIRV/instructions/atomic_seq.ll @@ -1,4 +1,4 @@ -; RUN: llc -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s ; CHECK-DAG: OpName [[ADD:%.*]] "test_add" ; CHECK-DAG: OpName [[SUB:%.*]] "test_sub" diff --git a/llvm/test/CodeGen/SPIRV/instructions/fcmp.ll b/llvm/test/CodeGen/SPIRV/instructions/fcmp.ll --- a/llvm/test/CodeGen/SPIRV/instructions/fcmp.ll +++ b/llvm/test/CodeGen/SPIRV/instructions/fcmp.ll @@ -1,4 +1,4 @@ -; RUN: llc -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s ; CHECK-DAG: OpName [[UEQ:%.*]] "test_ueq" ; CHECK-DAG: OpName [[OEQ:%.*]] "test_oeq" diff --git a/llvm/test/CodeGen/SPIRV/instructions/float-casts.ll b/llvm/test/CodeGen/SPIRV/instructions/float-casts.ll --- a/llvm/test/CodeGen/SPIRV/instructions/float-casts.ll +++ b/llvm/test/CodeGen/SPIRV/instructions/float-casts.ll @@ -1,4 +1,4 @@ -; RUN: llc -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s ; CHECK-DAG: OpName [[TRUNC32_16:%.*]] "f32tof16" ; CHECK-DAG: OpName [[EXT16_32:%.*]] "f16tof32" diff --git a/llvm/test/CodeGen/SPIRV/instructions/icmp.ll b/llvm/test/CodeGen/SPIRV/instructions/icmp.ll --- a/llvm/test/CodeGen/SPIRV/instructions/icmp.ll +++ b/llvm/test/CodeGen/SPIRV/instructions/icmp.ll @@ -1,4 +1,4 @@ -; RUN: llc -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s ; CHECK-DAG: OpName [[EQ:%.*]] "test_eq" ; CHECK-DAG: OpName [[NE:%.*]] "test_ne" diff --git a/llvm/test/CodeGen/SPIRV/instructions/integer-casts.ll b/llvm/test/CodeGen/SPIRV/instructions/integer-casts.ll --- a/llvm/test/CodeGen/SPIRV/instructions/integer-casts.ll +++ b/llvm/test/CodeGen/SPIRV/instructions/integer-casts.ll @@ -1,4 +1,4 @@ -; RUN: llc -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s ; CHECK-DAG: OpName [[TRUNC32_16:%.*]] "i32toi16" ; CHECK-DAG: OpName [[TRUNC32_8:%.*]] "i32toi8" diff --git a/llvm/test/CodeGen/SPIRV/instructions/intrinsics.ll b/llvm/test/CodeGen/SPIRV/instructions/intrinsics.ll --- a/llvm/test/CodeGen/SPIRV/instructions/intrinsics.ll +++ b/llvm/test/CodeGen/SPIRV/instructions/intrinsics.ll @@ -1,4 +1,4 @@ -; RUN: llc %s -mtriple=spirv32-unknown-unknown -o - | FileCheck %s +; RUN: llc -O0 %s -mtriple=spirv32-unknown-unknown -o - | FileCheck %s declare float @llvm.fabs.f32(float) declare float @llvm.rint.f32(float) diff --git a/llvm/test/CodeGen/SPIRV/instructions/ptrcmp.ll b/llvm/test/CodeGen/SPIRV/instructions/ptrcmp.ll --- a/llvm/test/CodeGen/SPIRV/instructions/ptrcmp.ll +++ b/llvm/test/CodeGen/SPIRV/instructions/ptrcmp.ll @@ -1,4 +1,4 @@ -; RUN: llc -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s ; CHECK-DAG: OpName [[EQ:%.*]] "test_eq" ; CHECK-DAG: OpName [[NE:%.*]] "test_ne" diff --git a/llvm/test/CodeGen/SPIRV/instructions/vector-shuffle.ll b/llvm/test/CodeGen/SPIRV/instructions/vector-shuffle.ll --- a/llvm/test/CodeGen/SPIRV/instructions/vector-shuffle.ll +++ b/llvm/test/CodeGen/SPIRV/instructions/vector-shuffle.ll @@ -1,4 +1,4 @@ -; RUN: llc -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s ; CHECK-DAG: OpName [[SHFv4:%.+]] "shuffle_v4" ; CHECK-DAG: OpName [[INSv4:%.+]] "insert_v4"