[llvm] 2e7489c - [VectorCombine] Fix build on gcc-7.5

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed May 28 02:55:47 PDT 2025


Author: Luke Lau
Date: 2025-05-28T10:55:38+01:00
New Revision: 2e7489c8c82c4c0d1a28ae1725b0701b1af2413a

URL: https://github.com/llvm/llvm-project/commit/2e7489c8c82c4c0d1a28ae1725b0701b1af2413a
DIFF: https://github.com/llvm/llvm-project/commit/2e7489c8c82c4c0d1a28ae1725b0701b1af2413a.diff

LOG: [VectorCombine] Fix build on gcc-7.5

Hopefully this fixes the build failure at
https://lab.llvm.org/buildbot/#/builders/116/builds/13423. gcc-14
seems to be able to deduce the type and compile this fine, but for
gcc-7 we need to avoid the Use/Value mismatch I guess.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
index 7336de442f370..52cb1dbb33b86 100644
--- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -1052,7 +1052,7 @@ bool VectorCombine::scalarizeOpOrCmp(Instruction &I) {
   SmallVector<Value *> ScalarOps;
   std::optional<uint64_t> Index;
 
-  auto Ops = II ? II->args() : I.operand_values();
+  auto Ops = II ? II->args() : I.operands();
   for (Value *Op : Ops) {
     Constant *VecC;
     Value *V;


        


More information about the llvm-commits mailing list