Add a missing def flag.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 21 Aug 2012 00:34:53 +0000 (00:34 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 21 Aug 2012 00:34:53 +0000 (00:34 +0000)
*** Bad machine code: Explicit definition marked as use ***
- function:    test_cos
- basic block: BB#0 L.entry (0x7ff2a2024fd0)
- instruction: VSETLNi32 %D11, %D11<undef>, %R0, 0, pred:14, pred:%noreg, %Q5<imp-use,kill>, %Q5<imp-def>
- operand 0:   %D11

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162247 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMBaseInstrInfo.cpp
test/CodeGen/ARM/2011-11-29-128bitArithmetics.ll

index 64d80dc67ab82b3246b99a557210caefed0419d0..29033e5117f0e986d50e18e47b1a24fedea51a08 100644 (file)
@@ -3464,13 +3464,11 @@ ARMBaseInstrInfo::setExecutionDomain(MachineInstr *MI, unsigned Domain) const {
       MI->RemoveOperand(0);
 
       MI->setDesc(get(ARM::VSETLNi32));
-      MIB.addReg(DReg);
-      MIB.addReg(DReg);
+      MIB.addReg(DReg, RegState::Define);
+      MIB.addReg(DReg, RegState::Undef);
       MIB.addReg(SrcReg);
       MIB.addImm(Lane);
 
-      MIB->getOperand(1).setIsUndef();
-
       if (isKill)
         MIB->addRegisterKilled(DstReg, TRI, true);
       MIB->addRegisterDefined(DstReg, TRI);
index 89c01d58c39854d3c60f5eca76dc08454dca4ee6..bf2db3aa252ada1fc65ceb10391d22e6b523f465 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s
+; RUN: llc < %s -march=arm -mcpu=cortex-a9 -verify-machineinstrs | FileCheck %s
 
 @A = global <4 x float> <float 0., float 1., float 2., float 3.>