[AMDGPU] Do not fix implicit vcc operand on INLINEASM
authorJay Foad <jay.foad@amd.com>
Wed, 29 Mar 2023 14:06:53 +0000 (15:06 +0100)
committerJay Foad <jay.foad@amd.com>
Wed, 29 Mar 2023 19:23:36 +0000 (20:23 +0100)
An INLINEASM can have an implicit def of vcc. It is not appropriate for
fixImplicitOperands to change this to vcc_lo on wave32.

Differential Revision: https://reviews.llvm.org/D147157

llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

index a1d13cc..ea0ccc8 100644 (file)
@@ -7877,6 +7877,9 @@ void SIInstrInfo::fixImplicitOperands(MachineInstr &MI) const {
   if (!ST.isWave32())
     return;
 
+  if (MI.isInlineAsm())
+    return;
+
   for (auto &Op : MI.implicit_operands()) {
     if (Op.isReg() && Op.getReg() == AMDGPU::VCC)
       Op.setReg(AMDGPU::VCC_LO);