History log of /llvm-project/llvm/test/Transforms/InstCombine/fpclass-from-dom-cond.ll (Results 1 – 5 of 5)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6
# a67bd94f 12-Dec-2024 Yingwei Zheng <dtcxzyw2333@gmail.com>

[ValueTracking] Add missing operand checks in `computeKnownFPClassFromCond` (#119579)

After https://github.com/llvm/llvm-project/pull/118257, we may call
`computeKnownFPClassFromCond` with unrelate

[ValueTracking] Add missing operand checks in `computeKnownFPClassFromCond` (#119579)

After https://github.com/llvm/llvm-project/pull/118257, we may call
`computeKnownFPClassFromCond` with unrelated conditions. Then
miscompilations may occur due to a lack of operand checks.

This bug was introduced by
https://github.com/llvm/llvm-project/commit/d2404ea6ced5fce9442260bde08a02d607fdd50d
and https://github.com/llvm/llvm-project/pull/80740. However, the
miscompilation couldn't have happened before
https://github.com/llvm/llvm-project/pull/118257, because we only added
related conditions to `DomConditionCache/AssumptionCache`.

Fix the miscompilation reported in
https://github.com/llvm/llvm-project/pull/118257#issuecomment-2536182166.

show more ...


Revision tags: llvmorg-19.1.5
# 16ec5349 02-Dec-2024 Yingwei Zheng <dtcxzyw2333@gmail.com>

[ValueTracking] Handle and/or of conditions in `computeKnownFPClassFromContext` (#118257)

Fix a typo introduced by
https://github.com/llvm/llvm-project/pull/83161.
This patch also supports decompo

[ValueTracking] Handle and/or of conditions in `computeKnownFPClassFromContext` (#118257)

Fix a typo introduced by
https://github.com/llvm/llvm-project/pull/83161.
This patch also supports decomposition of and/or expressions in
`computeKnownFPClassFromContext`.
Compile-time improvement:
http://llvm-compile-time-tracker.com/compare.php?from=688bb432c4b618de69a1d0e7807077a22f15762a&to=07493fc354b686f0aca79d6f817091a757bd7cd5&stat=instructions:u

show more ...


Revision tags: llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4
# db3bbe03 26-Feb-2024 Noah Goldstein <goldstein.w.n@gmail.com>

[Analysis] Unify most of the tracking between AssumptionCache and DomConditionCache

This helps cover some missing cases in both and hopefully serves as
creating an easier framework for extending gen

[Analysis] Unify most of the tracking between AssumptionCache and DomConditionCache

This helps cover some missing cases in both and hopefully serves as
creating an easier framework for extending general condition based
analysis.

Closes #83161

show more ...


Revision tags: llvmorg-18.1.0-rc3
# 16a0629e 14-Feb-2024 Yingwei Zheng <dtcxzyw2333@gmail.com>

[ValueTracking] Compute known FPClass from signbit idiom (#80740)

This patch improves `computeKnownFPClass` by using context-sensitive
information from `DomConditionCache`.
The motivation of this

[ValueTracking] Compute known FPClass from signbit idiom (#80740)

This patch improves `computeKnownFPClass` by using context-sensitive
information from `DomConditionCache`.
The motivation of this patch is to optimize the following case found in
[fmt/format.h](https://github.com/fmtlib/fmt/blob/e17bc67547a66cdd378ca6a90c56b865d30d6168/include/fmt/format.h#L3555-L3566):
```
define float @test(float %x, i1 %cond) {
%i32 = bitcast float %x to i32
%cmp = icmp slt i32 %i32, 0
br i1 %cmp, label %if.then1, label %if.else

if.then1:
%fneg = fneg float %x
br label %if.end

if.else:
br i1 %cond, label %if.then2, label %if.end

if.then2:
br label %if.end

if.end:
%value = phi float [ %fneg, %if.then1 ], [ %x, %if.then2 ], [ %x, %if.else ]
%ret = call float @llvm.fabs.f32(float %value)
ret float %ret
}
```
We can prove the sign bit of %value is always zero. Then the fabs can be
eliminated.

This pattern also exists in cpython/duckdb/oiio/openexr.

Compile-time impact:
https://llvm-compile-time-tracker.com/compare.php?from=f82e0809ba12170e2f648f8a1ac01e78ef06c958&to=041218bf5491996edd828cc15b3aec5a59ddc636&stat=instructions:u


|stage1-O3|stage1-ReleaseThinLTO|stage1-ReleaseLTO-g|stage1-O0-g|stage2-O3|stage2-O0-g|stage2-clang|
|--|--|--|--|--|--|--|
|-0.00%|+0.01%|+0.00%|-0.03%|+0.00%|+0.00%|+0.02%|

show more ...


# 542a3cb9 13-Feb-2024 Yingwei Zheng <dtcxzyw2333@gmail.com>

[ValueTracking] Compute known FPClass from dominating condition (#80941)

This patch improves `computeKnownFPClass` by using context-sensitive
information from `DomConditionCache`.