[SystemZ] Also clear kill flag for index reg in splitMove().
authorJonas Paulsson <jonas.paulsson@ericsson.com>
Mon, 26 Oct 2015 15:03:41 +0000 (15:03 +0000)
committerJonas Paulsson <jonas.paulsson@ericsson.com>
Mon, 26 Oct 2015 15:03:41 +0000 (15:03 +0000)
Discovered by running fp-move-05.ll with -verify-machineinstrs (added
to test case run).

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

lib/Target/SystemZ/SystemZInstrInfo.cpp
test/CodeGen/SystemZ/fp-move-05.ll

index 5d7accc6c0ecbd91657557a5d760a75f8116c09a..b16c0ad34250f9afc396d8191be611d632c263bc 100644 (file)
@@ -69,8 +69,10 @@ void SystemZInstrInfo::splitMove(MachineBasicBlock::iterator MI,
   MachineOperand &LowOffsetOp = MI->getOperand(2);
   LowOffsetOp.setImm(LowOffsetOp.getImm() + 8);
 
-  // Clear the kill flag for the address reg in the first instruction.
+ // Clear the kill flags for the base and index registers in the first
+ // instruction.
   EarlierMI->getOperand(1).setIsKill(false);
+  EarlierMI->getOperand(3).setIsKill(false);
 
   // Set the opcodes.
   unsigned HighOpcode = getOpcodeForOffset(NewOpcode, HighOffsetOp.getImm());
index da12af6d68c12cd2c5380eccfb5afee69e28bb5d..0864deee5137fd19cec63de098187156114e1d54 100644 (file)
@@ -1,6 +1,6 @@
 ; Test 128-bit floating-point loads.
 ;
-; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
+; RUN: llc < %s -mtriple=s390x-linux-gnu -verify-machineinstrs | FileCheck %s
 
 ; Check loads with no offset.
 define double @f1(i64 %src) {