[PATCH] D67564: [IR] allow fast-math-flags on phi of FP values

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 10:32:57 PDT 2019


spatel added a comment.

In D67564#1679387 <https://reviews.llvm.org/D67564#1679387>, @lebedev.ri wrote:

> I think this makes sense since `select` already has those attrs.
>  But what should happen for non-fp phi's? Do those flags make sense on e.g. i32 ?


Unless the definition of FPMathOperator is broken, we won't allow FMF on a non-FP type of phi/select.
Or are you asking if things like nsw/nuw/exact make sense on a phi with integer type? I haven't thought about that... 
(We can't have both FMF and wrapping/exact flags simultaneously because the underlying implementation shares the bits of SubclassOptionalData.)


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

https://reviews.llvm.org/D67564





More information about the llvm-commits mailing list