[llvm-bugs] [Bug 51133] New: X86 isel crashes when generating AVX code
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jul 19 04:14:54 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51133
Bug ID: 51133
Summary: X86 isel crashes when generating AVX code
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: jeremy.morse.llvm at gmail.com
CC: andrea.dibiagio at gmail.com, craig.topper at gmail.com,
llvm-bugs at lists.llvm.org, llvm-dev at redking.me.uk
Using a recent main (bad3ebbaae3d) build of llc, the following code makes llc
crash in SelectionDAG with arguments `llc reduced.ll -o /dev/null
-mtriple=x86_64-- -mattr=avx`:
define hidden void @_Z1dv() local_unnamed_addr {
entry:
%call = tail call <32 x i8> undef(<32 x i8> undef, i32 32)
%rem = srem <32 x i8> %call, <i8 13, i8 5, i8 19, i8 34, i8 2, i8 8, i8 2, i8
88, i8 62, i8 62, i8 5, i8 7, i8 97, i8 2, i8 3, i8 60, i8 3, i8 87, i8 7, i8
6, i8 84, i8 -128, i8 127, i8 56, i8 114, i8 1, i8 50, i8 7, i8 2, i8 8, i8 97,
i8 117>
%k.0.k.0.k.0. = load volatile <8 x i32>, <8 x i32>* undef, align 32
%0 = bitcast <8 x i32> %k.0.k.0.k.0. to <32 x i8>
%cmp = icmp ne <32 x i8> %rem, zeroinitializer
%cmp4 = icmp ne <32 x i8> %0, zeroinitializer
%1 = and <32 x i1> %cmp4, %cmp
%sext = sext <32 x i1> %1 to <32 x i8>
%call5 = tail call i32 (i8*, ...) undef(i8* poison, <32 x i8> %sext)
ret void
}
The crash is an assertion failure:
SelectionDAG.cpp:9016: void llvm::SelectionDAG::ReplaceAllUsesWith(llvm::SDNode
*, llvm::SDNode *): Assertion `(!From->hasAnyUseOfValue(i) ||
From->getValueType(i) == To->getValueType(i)) && "Cannot use this version of
ReplaceAllUsesWith!"' failed
It doesn't replicate if you remove -mattr=avx. I have a C reproducer (involving
some intrinsics) of this if that's more useful.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210719/3af4af2e/attachment.html>
More information about the llvm-bugs
mailing list