You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When targeting WASM bleeding-edge, the following code crashes backend with assertion VT.getSizeInBits() == Operand.getValueSizeInBits() && "Cannot BITCAST between types of different sizes!" failed during WebAssembly Instruction Selection.
The code can successfully compile when targeting WASM without specifying -mcpu=bleeding-edge.
The problem exists for v1i8 / v1i16, but it does not exist for v1i32 / v1i64.
In the following code from method DAGCombiner::visitEXTRACT_SUBVECTOR:
In Line 22301, Src is t3: i32 = Constant<0>.
In Line 22303, Src becomes t4: v8i16 = BUILD_VECTOR Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>.
In Line 22304, DAG.getBitcast is called with 2 types of different size (v1i16 and v8i16), causing the assertion error.
Description
When targeting WASM
bleeding-edge
, the following code crashes backend with assertionVT.getSizeInBits() == Operand.getValueSizeInBits() && "Cannot BITCAST between types of different sizes!"
failed duringWebAssembly Instruction Selection
.The code can successfully compile when targeting WASM without specifying
-mcpu=bleeding-edge
.The problem exists for v1i8 / v1i16, but it does not exist for v1i32 / v1i64.
Minimal Reproduction
https://godbolt.org/z/T44czsqWr
Code
Stack Trace
Cause
In the following code from method
DAGCombiner::visitEXTRACT_SUBVECTOR
:In Line 22301,
Src
ist3: i32 = Constant<0>
.In Line 22303,
Src
becomest4: v8i16 = BUILD_VECTOR Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>
.In Line 22304,
DAG.getBitcast
is called with 2 types of different size (v1i16 and v8i16), causing the assertion error.llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Lines 22300 to 22305 in 8ab032f
When not specifying
bleeding-edge
, theDAGCombiner::visitEXTRACT_SUBVECTOR
method is not called.The text was updated successfully, but these errors were encountered: