[llvm] [VectorCombine] Generalize foldBitOpOfBitcasts to support more cast operations (PR #148350)

Rahul Yadav via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 19 01:58:13 PDT 2025


rhyadav wrote:

@RKSimon i've addressed comments :

- moved the test to llvm/test/Transforms/VectorCombine/X86/bitop-of-castops.ll

> updated `LLVM_DEBUG(dbgs() << "Found a VP Intrinsic to scalarize: " << VPI
>                     << "\n");` 
> the ci style check `diff --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp` now shows this as an issue `index 3fd9428d9a8b..ff1532336ae0 100644
--- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -1090,8 +1090,7 @@ bool VectorCombine::scalarizeVPIntrinsic(Instruction &I) {
       (SplatCost * !Op0->hasOneUse()) + (SplatCost * !Op1->hasOneUse());
   InstructionCost NewCost = ScalarOpCost + SplatCost + CostToKeepSplats;
 
-  LLVM_DEBUG(dbgs() << "Found a VP Intrinsic to scalarize: " << VPI
-                    << "\n");
+  LLVM_DEBUG(dbgs() << "Found a VP Intrinsic to scalarize: " << VPI << "\n");
   LLVM_DEBUG(dbgs() << "Cost of Intrinsic: " << OldCost
                     << ", Cost of scalarizing:" << NewCost << "\n");
,`  i have gone with your recommendation over the ci check

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


More information about the llvm-commits mailing list