[PATCH] D81634: Remove assert from ShuffleVectorInst
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 01:15:00 PDT 2020
samparker created this revision.
samparker added reviewers: spatel, uabelho.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
Which triggers on valid, but not useful, IR such as a undef mask.
Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=46276
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D81634
Files:
llvm/lib/IR/Instructions.cpp
llvm/test/CodeGen/X86/cgp_shuffle_crash.ll
Index: llvm/test/CodeGen/X86/cgp_shuffle_crash.ll
===================================================================
--- /dev/null
+++ llvm/test/CodeGen/X86/cgp_shuffle_crash.ll
@@ -0,0 +1,23 @@
+; RUN: llc %s -o - | FileCheck %s
+
+target triple = "x86_64-unknown-linux-gnu"
+
+; CHECK-LABEL: shuffle_one_source
+
+define void @shuffle_one_source() {
+BB:
+ %Shuff7 = shufflevector <2 x i8> zeroinitializer, <2 x i8> zeroinitializer, <2 x i32> undef
+ br label %CF
+
+CF: ; preds = %CF, %BB
+ %Cmp82 = icmp slt i32 480483, undef
+ br i1 undef, label %CF, label %CF242
+
+CF242: ; preds = %CF
+ %B109 = mul <2 x i8> undef, %Shuff7
+ br label %CF245
+
+CF245: ; preds = %CF245, %CF242
+ %Sl187 = select i1 %Cmp82, <2 x i8> %B109, <2 x i8> undef
+ br label %CF245
+}
Index: llvm/lib/IR/Instructions.cpp
===================================================================
--- llvm/lib/IR/Instructions.cpp
+++ llvm/lib/IR/Instructions.cpp
@@ -2053,7 +2053,6 @@
if (UsesLHS && UsesRHS)
return false;
}
- assert((UsesLHS ^ UsesRHS) && "Should have selected from exactly 1 source");
return true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81634.270051.patch
Type: text/x-patch
Size: 1254 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200611/8119c005/attachment.bin>
More information about the llvm-commits
mailing list