[llvm] [InstCombine] Bail out on type mismatch in foldBitCastBitwiseLogic (PR #179640)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 4 04:16:49 PST 2026


================
@@ -903,3 +903,16 @@ end:                                        ; preds = %unreachable, %entry
   %3 = extractelement <2 x i16> %2, i64 0
   ret i16 %3
 }
+
+; Ensure we do not crash when constant folding bitcasts of exotic vector types
+define <3 x i8> @bitcast_exotic_vector_type(<3 x i32> %LGV) {
----------------
antoniofrighetto wrote:

```suggestion
define <3 x i8> @bitcast_vector_type(<3 x i32> %LGV) {
```

https://github.com/llvm/llvm-project/pull/179640


More information about the llvm-commits mailing list