[all-commits] [llvm/llvm-project] 2ad42c: [ValueTracking] improve analysis for fdiv with sam...
RotateRight via All-commits
all-commits at lists.llvm.org
Sun Jun 21 06:08:55 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 2ad42c2653ce31ca93dd2c9fdbd561d1d846d983
https://github.com/llvm/llvm-project/commit/2ad42c2653ce31ca93dd2c9fdbd561d1d846d983
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2020-06-21 (Sun, 21 Jun 2020)
Changed paths:
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/test/Transforms/InstSimplify/floating-point-compare.ll
Log Message:
-----------
[ValueTracking] improve analysis for fdiv with same operands
(The 'nnan' variant of this pattern is already tested to produce '1.0'.)
https://alive2.llvm.org/ce/z/D4hPBy
define i1 @src(float %x, i32 %y) {
%0:
%d = fdiv float %x, %x
%uge = fcmp uge float %d, 0.000000
ret i1 %uge
}
=>
define i1 @tgt(float %x, i32 %y) {
%0:
ret i1 1
}
Transformation seems to be correct!
More information about the All-commits
mailing list