[llvm] [InstCombine] Added pattern for recognising the construction of packed integers. (PR #147414)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 22 08:35:00 PDT 2025
================
@@ -0,0 +1,110 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt < %s -passes=instcombine -S -data-layout="E" | FileCheck %s --check-prefixes=CHECK
+; RUN: opt < %s -passes=instcombine -S -data-layout="e" | FileCheck %s --check-prefixes=CHECK
+
+define i32 @bitcast.v2i(<4 x i8> %v) {
----------------
dtcxzyw wrote:
This patch doesn't work for big endian: https://alive2.llvm.org/ce/z/Frs8YX
For a vector->scalar bitcast on a big-endian system, the first element is put in the most significant bits. See also https://llvm.org/docs/LangRef.html#vector-type.
https://github.com/llvm/llvm-project/pull/147414
More information about the llvm-commits
mailing list