[PATCH] D35821: Have ARM call setBooleanContents(ZeroOrOneBooleanContent).
    Eli Friedman via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Aug  7 17:13:00 PDT 2017
    
    
  
efriedma added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:3673
+           isa<ConstantSDNode>(Tmp2.getOperand(1)) &&
+           dyn_cast<ConstantSDNode>(Tmp2.getOperand(1))->getZExtValue() == 1))
+        Tmp3 = Tmp2;
----------------
Use isOne() here, not getZExtValue().  (getZExtValue() is generally a bad idea because it crashes on values which don't fit into 64 bits.)
Use `cast<>`, not `dyn_cast<>`, when the cast must succeed.
https://reviews.llvm.org/D35821
    
    
More information about the llvm-commits
mailing list