[PATCH] D21694: Verifier: Reject non-float !fpmath

Ahmed Bougacha via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 27 12:25:14 PDT 2016


ab added inline comments.

================
Comment at: lib/IR/Verifier.cpp:3671
@@ -3670,1 +3670,3 @@
       const APFloat &Accuracy = CFP0->getValueAPF();
+      Assert(&Accuracy.getSemantics() == &APFloat::IEEEsingle,
+             "fpmath accuracy must have float type", &I);
----------------
arsenm wrote:
> ab wrote:
> > Looking at this again:  perhaps cleaner to do CFP0->getType()->isFloatTy() ?
> Since the other condition needs the APFloat anyway maybe it's more consistent to use it to check all the conditions?
Eh, fair enough; lgtm


http://reviews.llvm.org/D21694





More information about the llvm-commits mailing list