[PATCH] D43515: More math intrinsics for conservative math handling

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 10:55:40 PDT 2019


kpn marked 3 inline comments as done.
kpn added a comment.

The only thing left in this ticket to commit is the fptosi and fptoui changes. I'm working on incorporating review comments from D55897 <https://reviews.llvm.org/D55897> into this ticket and fixing other bugs that I'm coming across. I'll hopefully update this ticket next week.



================
Comment at: lib/IR/Verifier.cpp:4579
+    uint64_t NumSrcElem = 0;
+    if (Operand->getType()->isVectorTy()) {
+      auto *OperandT = cast<VectorType>(Operand->getType());
----------------
kbarton wrote:
> Can you use a dyn_cast here instead?
> if (auto *OperandT = dyn_cast<VectorType>(Operand->getType())) {
>   do vector stuff
> }
>   
Yes, that's much more concise.


================
Comment at: lib/IR/Verifier.cpp:4618
+    Value *Operand = FPI.getArgOperand(0);
+    uint64_t NumSrcElem = 0;
+    if (Operand->getType()->isVectorTy()) {
----------------
kbarton wrote:
> same comment about commoning the asserts here. 
The fptrunc and fpext changes were split out into another ticket and updated there. That committed code is more concise in I suspect the way you are intending. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D43515/new/

https://reviews.llvm.org/D43515





More information about the llvm-commits mailing list