[all-commits] [llvm/llvm-project] 76e9c2: [FPEnv] Generate constrained FP comparisons from c...
Ulrich Weigand via All-commits
all-commits at lists.llvm.org
Fri Jan 10 05:33:44 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 76e9c2a9870e36415eb343d28942a42296f85597
https://github.com/llvm/llvm-project/commit/76e9c2a9870e36415eb343d28942a42296f85597
Author: Ulrich Weigand <ulrich.weigand at de.ibm.com>
Date: 2020-01-10 (Fri, 10 Jan 2020)
Changed paths:
M clang/lib/CodeGen/CGExprScalar.cpp
A clang/test/CodeGen/fpconstrained-cmp-double.c
A clang/test/CodeGen/fpconstrained-cmp-float.c
M llvm/include/llvm/IR/IRBuilder.h
Log Message:
-----------
[FPEnv] Generate constrained FP comparisons from clang
Update the IRBuilder to generate constrained FP comparisons in
CreateFCmp when IsFPConstrained is true, similar to the other
places in the IRBuilder.
Also, add a new CreateFCmpS to emit signaling FP comparisons,
and use it in clang where comparisons are supposed to be signaling
(currently, only when emitting code for the <, <=, >, >= operators).
Note that there is currently no way to add fast-math flags to a
constrained FP comparison, since this is implemented as an intrinsic
call that returns a boolean type, and FMF are only allowed for calls
returning a floating-point type. However, given the discussion around
https://bugs.llvm.org/show_bug.cgi?id=42179, it seems that FCmp itself
really shouldn't have any FMF either, so this is probably OK.
Reviewed by: craig.topper
Differential Revision: https://reviews.llvm.org/D71467
More information about the All-commits
mailing list