[llvm] bf0bac4 - [CodeGen] Initialize ISD after 800d222e53dabfe1e242bd06ab70f58c36e768ed

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 19:52:30 PDT 2022


Author: Fangrui Song
Date: 2022-06-13T19:52:21-07:00
New Revision: bf0bac43ffd95896abfbd6a6dd1ac7a3875193d8

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

LOG: [CodeGen] Initialize ISD after 800d222e53dabfe1e242bd06ab70f58c36e768ed

In the Intrinsic::fptosi_sat branch, ISD was uninitialized when Tys.empty().

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/BasicTTIImpl.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/BasicTTIImpl.h b/llvm/include/llvm/CodeGen/BasicTTIImpl.h
index c791fda6e867..60fa65718bf7 100644
--- a/llvm/include/llvm/CodeGen/BasicTTIImpl.h
+++ b/llvm/include/llvm/CodeGen/BasicTTIImpl.h
@@ -1612,7 +1612,7 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
 
     // Library call cost - other than size, make it expensive.
     unsigned SingleCallCost = CostKind == TTI::TCK_CodeSize ? 1 : 10;
-    unsigned ISD;
+    unsigned ISD = 0;
     switch (IID) {
     default: {
       // Scalable vectors cannot be scalarized, so return Invalid.


        


More information about the llvm-commits mailing list