[all-commits] [llvm/llvm-project] b89ae1: [InstSimplify] fold fcmp using isKnownNeverInfinit...
RotateRight via All-commits
all-commits at lists.llvm.org
Sun Jul 26 06:05:02 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: b89ae102e6f5ed3760f1ae5788bd76ef8e9d9490
https://github.com/llvm/llvm-project/commit/b89ae102e6f5ed3760f1ae5788bd76ef8e9d9490
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2020-07-26 (Sun, 26 Jul 2020)
Changed paths:
M llvm/lib/Analysis/InstructionSimplify.cpp
M llvm/test/Transforms/InstSimplify/floating-point-compare.ll
Log Message:
-----------
[InstSimplify] fold fcmp using isKnownNeverInfinity + isKnownNeverNaN
Follow-up to D84035 / rG7393d7574c09.
This sidesteps a question of FMF/poison on fcmp raised in PR46077:
http://bugs.llvm.org/PR46077
https://alive2.llvm.org/ce/z/TCsyzD
define i1 @src(float %x) {
%0:
%x42 = fadd nnan ninf float %x, 42.000000
%r = fcmp ueq float %x42, inf
ret i1 %r
}
=>
define i1 @tgt(float %x) {
%0:
ret i1 0
}
Transformation seems to be correct!
https://alive2.llvm.org/ce/z/FQaH7a
define i1 @src(i8 %x) {
%0:
%cast = uitofp i8 %x to float
%r = fcmp one float inf, %cast
ret i1 %r
}
=>
define i1 @tgt(i8 %x) {
%0:
ret i1 1
}
Transformation seems to be correct!
More information about the All-commits
mailing list