Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 May 2017 16:12:43 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r317751 - head/contrib/llvm/lib/Target/ARM
Message-ID:  <201705031612.v43GChWA043569@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Wed May  3 16:12:43 2017
New Revision: 317751
URL: https://svnweb.freebsd.org/changeset/base/317751

Log:
  Pull in r301983 from upstream llvm trunk (by Tim Northover):
  
    ARM: avoid handing a deleted node back to TableGen during ISel.
  
    When we replaced the multiplicand the destination node might already
    exist. When that happens the original gets CSEd and deleted. However,
    it's actually used as the offset so nonsense is produced.
  
    Should fix PR32726.
  
  This fixes an assertion failure when building building www/firefox 53.0
  for arm.
  
  Reported by:	Bob Prohaska
  PR:		218782
  MFC after:	3 days

Modified:
  head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp

Modified: head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
==============================================================================
--- head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp	Wed May  3 16:03:33 2017	(r317750)
+++ head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp	Wed May  3 16:12:43 2017	(r317751)
@@ -748,7 +748,9 @@ bool ARMDAGToDAGISel::SelectLdStSOReg(SD
     unsigned PowerOfTwo = 0;
     SDValue NewMulConst;
     if (canExtractShiftFromMul(Offset, 31, PowerOfTwo, NewMulConst)) {
+      HandleSDNode Handle(Offset);
       replaceDAGValue(Offset.getOperand(1), NewMulConst);
+      Offset = Handle.getValue();
       ShAmt = PowerOfTwo;
       ShOpcVal = ARM_AM::lsl;
     }
@@ -1428,7 +1430,9 @@ bool ARMDAGToDAGISel::SelectT2AddrModeSo
     unsigned PowerOfTwo = 0;
     SDValue NewMulConst;
     if (canExtractShiftFromMul(OffReg, 3, PowerOfTwo, NewMulConst)) {
+      HandleSDNode Handle(OffReg);
       replaceDAGValue(OffReg.getOperand(1), NewMulConst);
+      OffReg = Handle.getValue();
       ShAmt = PowerOfTwo;
     }
   }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705031612.v43GChWA043569>