-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[X86ISelLowering] MVT llvm::EVT::getSimpleVT() const: Assertion `isSimple() && "Expected a SimpleValueType!"' failed. #84660
Comments
@llvm/issue-subscribers-backend-x86 Author: Quentin Dian (DianQK)
I tried this code:
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define void @<!-- -->foo(i128 %arg) #<!-- -->0 {
bb:
%i = xor i128 %arg, 1
%i1 = insertelement <2 x i128> zeroinitializer, i128 %i, i64 0
%i2 = shufflevector <2 x i128> %i1, <2 x i128> zeroinitializer, <2 x i32> zeroinitializer
%i3 = and <2 x i128> <i128 1, i128 1>, %i2
%i4 = trunc <2 x i128> %i3 to <2 x i32>
store <2 x i32> %i4, ptr null, align 8
ret void
}
attributes #<!-- -->0 = { "target-cpu"="sandybridge" } I got following error log:
Godbolt: https://llvm.godbolt.org/z/4WvMGc59b |
Perhaps we need this patch? diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index e1e6c22eb8cc..2b3a2b684366 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -48142,6 +48142,8 @@ static SDValue combineAndShuffleNot(SDNode *N, SelectionDAG &DAG,
assert(N->getOpcode() == ISD::AND && "Unexpected opcode combine into ANDNP");
EVT VT = N->getValueType(0);
+ if (!VT.isSimple())
+ return SDValue();
// Do not split 256 and 512 bit vectors with SSE2 as they overwrite original
// value and require extra moves.
if (!((VT.is128BitVector() && Subtarget.hasSSE2()) || |
Thanks for the fix! |
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this issue
Mar 10, 2024
…86ISD::ANDNP target nodes Fixes llvm#84660 (cherry picked from commit 862c7e0)
/pull-request #84698 |
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this issue
Mar 13, 2024
…86ISD::ANDNP target nodes Fixes llvm#84660 (cherry picked from commit 862c7e0)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried this code:
I got the following error log:
Bisected to 15dd5ed.
Godbolt: https://llvm.godbolt.org/z/o9fEqj8x5
From: rust-lang/rust#122252
The text was updated successfully, but these errors were encountered: