[PATCH] D102673: [ConstantFolding] Fold constrained arithmetic intrinsics
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 21 06:24:47 PDT 2021
spatel added a comment.
I just got over to @kpn 's question on llvm-dev:
https://lists.llvm.org/pipermail/llvm-dev/2021-July/151727.html
And this patch should have tests with SNaN and QNaN inputs, so we have coverage for those cases (let me know if they are/were here, but I missed it).
define float @fadd.except.strict_qnan_qnan(float %x) {
%r = call float @llvm.experimental.constrained.fadd.f32(float 0x7ff8000000000000, float 0x7ff8000000000000, metadata !"round.dynamic", metadata !"fpexcept.strict")
ret float %r
}
define float @fadd.except.strict_snan_qnan(float %x) {
%r = call float @llvm.experimental.constrained.fadd.f32(float 0x7ff4000000000000, float 0x7ff8000000000000, metadata !"round.dynamic", metadata !"fpexcept.strict")
ret float %r
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102673/new/
https://reviews.llvm.org/D102673
More information about the llvm-commits
mailing list