[PATCH] D43142: Experimental pass to convert all floating point operations to the equivalent constrained intrinsics

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 1 10:44:09 PDT 2018


cameron.mcinally added a comment.

Here's a quick example. You can see in the IR that the ConstantFolder picks up the FDiv as undefined:

  #include <stdio.h>
  
  int main() {
    float x = 5.0;
    float y = 0.0;
    float z = x/y;
    return z;
  }

and

  ; Function Attrs: norecurse nounwind readnone uwtable
  define dso_local i32 @main() local_unnamed_addr #0 !dbg !6 {
  entry:
    ret i32 undef, !dbg !8
  }


https://reviews.llvm.org/D43142





More information about the llvm-commits mailing list