[clang] [RISCV] Remove unneeded multiply in RISCV CodeGenTypes (PR #92644)

via cfe-commits cfe-commits at lists.llvm.org
Sat May 18 03:24:02 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-codegen

Author: Brandon Wu (4vtomat)

<details>
<summary>Changes</summary>

The NumVectors other than 1 is handled by the code above.


---
Full diff: https://github.com/llvm/llvm-project/pull/92644.diff


1 Files Affected:

- (modified) clang/lib/CodeGen/CodeGenTypes.cpp (+1-2) 


``````````diff
diff --git a/clang/lib/CodeGen/CodeGenTypes.cpp b/clang/lib/CodeGen/CodeGenTypes.cpp
index e8d75eda029e6..0a926e4ac27fe 100644
--- a/clang/lib/CodeGen/CodeGenTypes.cpp
+++ b/clang/lib/CodeGen/CodeGenTypes.cpp
@@ -523,8 +523,7 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) {
           return llvm::StructType::get(getLLVMContext(), EltTys);
         }
         return llvm::ScalableVectorType::get(ConvertType(Info.ElementType),
-                                             Info.EC.getKnownMinValue() *
-                                                 Info.NumVectors);
+                                             Info.EC.getKnownMinValue());
       }
 #define WASM_REF_TYPE(Name, MangledName, Id, SingletonId, AS)                  \
   case BuiltinType::Id: {                                                      \

``````````

</details>


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


More information about the cfe-commits mailing list