[PATCH] D55223: [SelectionDAG] Don't pass on DemandedElts when handling SCALAR_TO_VECTOR
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 7 01:22:01 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL348574: [SelectionDAG] Don't pass on DemandedElts when handling SCALAR_TO_VECTOR (authored by RKSimon, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D55223?vs=176985&id=177144#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55223/new/
https://reviews.llvm.org/D55223
Files:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/trunk/test/CodeGen/AMDGPU/computeKnownBits-scalar-to-vector-crash.ll
Index: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2352,7 +2352,7 @@
break;
SDValue N0 = Op.getOperand(0);
- Known = computeKnownBits(N0, DemandedElts, Depth + 1);
+ Known = computeKnownBits(N0, Depth + 1);
if (N0.getValueSizeInBits() != BitWidth)
Known = Known.trunc(BitWidth);
Index: llvm/trunk/test/CodeGen/AMDGPU/computeKnownBits-scalar-to-vector-crash.ll
===================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/computeKnownBits-scalar-to-vector-crash.ll
+++ llvm/trunk/test/CodeGen/AMDGPU/computeKnownBits-scalar-to-vector-crash.ll
@@ -0,0 +1,11 @@
+; RUN: llc -march=amdgcn -mcpu=gfx802 -verify-machineinstrs < %s | FileCheck %s
+
+; CHECK: s_waitcnt
+define <2 x i16> @main(<2 x float>) #0 {
+ %2 = bitcast <2 x float> %0 to <4 x i16>
+ %3 = shufflevector <4 x i16> %2, <4 x i16> undef, <2 x i32> <i32 0, i32 undef>
+ %4 = extractelement <4 x i16> %2, i32 0
+ %5 = insertelement <2 x i16> %3, i16 %4, i32 0
+ ret <2 x i16> %5
+}
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55223.177144.patch
Type: text/x-patch
Size: 1219 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181207/9ecba521/attachment.bin>
More information about the llvm-commits
mailing list