[PATCH] D17209: AMDGPU: Re-visit nodes in performAndCombine

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 12:22:37 PST 2016


arsenm created this revision.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
Herald added a subscriber: arsenm.

This fixes test regressions when i64 loads/stores are made promote.

http://reviews.llvm.org/D17209

Files:
  lib/Target/AMDGPU/AMDGPUISelLowering.cpp

Index: lib/Target/AMDGPU/AMDGPUISelLowering.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+++ lib/Target/AMDGPU/AMDGPUISelLowering.cpp
@@ -2305,6 +2305,11 @@
   SDValue LoAnd = DAG.getNode(ISD::AND, SL, MVT::i32, Lo, LoRHS);
   SDValue HiAnd = DAG.getNode(ISD::AND, SL, MVT::i32, Hi, HiRHS);
 
+  // Re-visit the ands. It's possible we eliminated one of them and it could
+  // simplify the vector.
+  DCI.AddToWorklist(Lo.getNode());
+  DCI.AddToWorklist(Hi.getNode());
+
   SDValue Vec = DAG.getNode(ISD::BUILD_VECTOR, SL, MVT::v2i32, LoAnd, HiAnd);
   return DAG.getNode(ISD::BITCAST, SL, MVT::i64, Vec);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17209.47831.patch
Type: text/x-patch
Size: 682 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160212/9963935a/attachment.bin>


More information about the llvm-commits mailing list