[llvm] [ARM][Codegen] Fix vector data miscompilation in arm32be (PR #105519)

David Green via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 10:38:47 PDT 2024


================
@@ -18601,7 +18588,6 @@ static SDValue PerformBITCASTCombine(SDNode *N,
   if ((Src.getOpcode() == ARMISD::VMOVIMM ||
        Src.getOpcode() == ARMISD::VMVNIMM ||
        Src.getOpcode() == ARMISD::VMOVFPIMM) &&
-      SrcVT.getScalarSizeInBits() <= DstVT.getScalarSizeInBits() &&
----------------
davemgreen wrote:

I think this needs to be more restictive, not less restrictive. There are cases where it will convert `bitcast+vector_reg_cast+vmovimm` incorrectly as the bitcast needs to remain to keep the lane shuffling that is required.

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


More information about the llvm-commits mailing list