| Issue |
241635
|
| Summary |
SelectionDAG crashes for bitcast+bitextract
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
alinas
|
1. Crash: "llc: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:7427: ...
Assertion `VT.getSizeInBits() == N1.getValueSizeInBits() && "Cannot BITCAST between types of different sizes!"' failed."
Testcase with llc:
```
target datalayout = "e-m:o-p:32:32-i64:64-i128:128-n32:64-S128"
target triple = "arm64_32-apple-watchos"
define i32 @crash_bitcast(<2 x ptr> %v) {
%b = bitcast <2 x ptr> %v to b64
%l = bitextract i32, b64 %b, i32 32
ret i32 %l
}
```
2. Crash: "llc: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:4316: void llvm::SelectionDAGBuilder::visitBitExtract(const User &):
Assertion `ResultVT.getSizeInBits() <= SrcVT.getSizeInBits() && "bitextract result wider than source should be rejected by verifier"' failed."
Testcase with llc:
```
target datalayout = "e-m:o-p:32:32-i64:64-i128:128-n32:64-S128"
target triple = "arm64_32-apple-watchos"
define ptr @crash_bitextract(<3 x i16> %v) {
%b = bitcast <3 x i16> %v to b48
%l = bitextract ptr, b48 %b, i32 0
ret ptr %l
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs