Index: llvm/lib/CodeGen/PostRASchedulerList.cpp =================================================================== --- llvm/lib/CodeGen/PostRASchedulerList.cpp +++ llvm/lib/CodeGen/PostRASchedulerList.cpp @@ -349,7 +349,7 @@ Scheduler.Observe(MI, CurrentCount); } I = MI; - if (MI.isBundle()) + if (MI.isBundledWithSucc()) Count -= MI.getBundleSize(); } assert(Count == 0 && "Instruction count mismatch!"); Index: llvm/test/CodeGen/AMDGPU/bundled_insts_no_bundle.mir =================================================================== --- /dev/null +++ llvm/test/CodeGen/AMDGPU/bundled_insts_no_bundle.mir @@ -0,0 +1,18 @@ +# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=post-RA-sched -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s + +--- +# GCN-LABEL: name: bundled_insts_no_bundle +# GCN: entry: +# GCN-NEXT: $sgpr0 = KILL undef $sgpr0 { +# GCN-NEXT: $sgpr1 = KILL undef $sgpr1 +# GCN-NEXT: } + +name: bundled_insts_no_bundle +body: | + bb.0.entry: + + $sgpr0 = KILL undef $sgpr0 { + $sgpr1 = KILL undef $sgpr1 + } + +...