[llvm-branch-commits] [llvm] 3191fa2 - Use isa<UndefValue> where	needed
    via llvm-branch-commits 
    llvm-branch-commits at lists.llvm.org
       
    Wed Jan 15 07:51:30 PST 2020
    
    
  
Author: gbtozers
Date: 2020-01-15T15:51:22Z
New Revision: 3191fa21be09d6e7352751f86626a2e8fb251555
URL: https://github.com/llvm/llvm-project/commit/3191fa21be09d6e7352751f86626a2e8fb251555
DIFF: https://github.com/llvm/llvm-project/commit/3191fa21be09d6e7352751f86626a2e8fb251555.diff
LOG: Use isa<UndefValue> where needed
Added: 
    
Modified: 
    llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
Removed: 
    
################################################################################
diff  --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
index 5bae1e8eb7ef..9d703d2ab7db 100644
--- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -326,7 +326,7 @@ bool llvm::RemovePureUndefDbgInstrs(Function &F) {
                           DVI->getDebugLoc()->getInlinedAt());
         if (NonUndefVariables.count(Key))
           continue;
-        if (DVI->getValue() == UndefValue::get(DVI->getValue()->getType())) {
+        if (isa<UndefValue>(DVI->getValue())) {
           auto R = UndefVariableMap.insert(
               {Key, SmallVector<DbgValueInst *, 8>(1, DVI)});
           if (!R.second) {
        
    
    
More information about the llvm-branch-commits
mailing list