[PATCH] D83376: [Legalizer] Fix wrong operand in split vector helper

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 8 02:40:01 PDT 2020


qiucf created this revision.
qiucf added reviewers: andrew.w.kaylor, uweigand, craig.topper, kpn.
Herald added subscribers: llvm-commits, steven.zhang, hiraditya.
Herald added a project: LLVM.

It's hard to provide a test case now since vector int-to-fp isn't ready on PowerPC. But this should be easy to review. I guess it's a typo introduced in D69275 <https://reviews.llvm.org/D69275>.

It may cause an unknown segfault in `getNode`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83376

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -2610,9 +2610,9 @@
   SDValue Chain;
   if (N->isStrictFPOpcode()) {
     HalfLo = DAG.getNode(N->getOpcode(), DL, {HalfVT, MVT::Other},
-                         {N->getOperand(0), HalfLo});
+                         {N->getOperand(0), InLoVec});
     HalfHi = DAG.getNode(N->getOpcode(), DL, {HalfVT, MVT::Other},
-                         {N->getOperand(0), HalfHi});
+                         {N->getOperand(0), InHiVec});
     // Legalize the chain result - switch anything that used the old chain to
     // use the new one.
     Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, HalfLo.getValue(1),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83376.276349.patch
Type: text/x-patch
Size: 858 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200708/7390c80a/attachment.bin>


More information about the llvm-commits mailing list