History log of /llvm-project/llvm/unittests/Analysis/ValueTrackingTest.cpp (Results 1 – 25 of 126)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# d8975124 16-Jan-2025 Pedro Lobo <pedro.lobo@tecnico.ulisboa.pt>

[ValueTracking] Return `poison` for zero-sized types (#122647)

Return `poison` for zero-sized types in `isBitwiseValue`.


Revision tags: llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2
# fa789dff 11-Oct-2024 Rahul Joshi <rjoshi@nvidia.com>

[NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (#111752)

Rename the function to reflect its correct behavior and to be consistent
with `Module::getOrInsertFunction`. This is a

[NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (#111752)

Rename the function to reflect its correct behavior and to be consistent
with `Module::getOrInsertFunction`. This is also in preparation of
adding a new `Intrinsic::getDeclaration` that will have behavior similar
to `Module::getFunction` (i.e, just lookup, no creation).

show more ...


Revision tags: llvmorg-19.1.1, llvmorg-19.1.0
# 52b48a70 13-Sep-2024 JOE1994 <joseph942010@gmail.com>

[llvm][unittests] Strip unneeded use of raw_string_ostream::str() (NFC)

Avoid excess layer of indirection.


Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3
# 4bffbba7 09-Aug-2024 Sergei Barannikov <barannikov88@gmail.com>

[UnitTests] Convert a test to use opaque pointers (#102668)


Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7
# 04ae6e60 20-May-2024 Yingwei Zheng <dtcxzyw2333@gmail.com>

[ValueTracking] Fix incorrect inferrence about the signbit of sqrt (#92510)

According to IEEE Std 754-2019, `sqrt` returns nan when the input is
negative (except for -0). In this case, we cannot ma

[ValueTracking] Fix incorrect inferrence about the signbit of sqrt (#92510)

According to IEEE Std 754-2019, `sqrt` returns nan when the input is
negative (except for -0). In this case, we cannot make assumptions about
sign bit of the result.

Fixes https://github.com/llvm/llvm-project/issues/92217

show more ...


Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4
# 60de56c7 16-Apr-2024 Harald van Dijk <harald.vandijk@codeplay.com>

[ValueTracking] Restore isKnownNonZero parameter order. (#88873)

Prior to #85863, the required parameters of llvm::isKnownNonZero were
Value and DataLayout. After, they are Value, Depth, and Simpli

[ValueTracking] Restore isKnownNonZero parameter order. (#88873)

Prior to #85863, the required parameters of llvm::isKnownNonZero were
Value and DataLayout. After, they are Value, Depth, and SimplifyQuery,
where SimplifyQuery is implicitly constructible from DataLayout. The
change to move Depth before SimplifyQuery needed callers to be updated
unnecessarily, and as commented in #85863, we actually want Depth to be
after SimplifyQuery anyway so that it can be defaulted and the caller
does not need to specify it.

show more ...


# f78b3466 15-Apr-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

ValueTracking: Treat poison more aggressively in computeKnownFPClass (#87990)

Assume no valid values, and the sign bit is 0.


# e0a62871 12-Apr-2024 Yingwei Zheng <dtcxzyw2333@gmail.com>

[ValueTracking] Convert `isKnownNonZero` to use SimplifyQuery (#85863)

This patch converts `isKnownNonZero` to use SimplifyQuery. Then we can
use the context information from `DomCondCache`.

Fix

[ValueTracking] Convert `isKnownNonZero` to use SimplifyQuery (#85863)

This patch converts `isKnownNonZero` to use SimplifyQuery. Then we can
use the context information from `DomCondCache`.

Fixes https://github.com/llvm/llvm-project/issues/85823.
Alive2: https://alive2.llvm.org/ce/z/QUvHVj

show more ...


# 2bc637b1 04-Apr-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

ValueTracking: Handle ConstantAggregateZero in computeKnownFPClass


Revision tags: llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1
# a41226b0 07-Mar-2024 Björn Pettersson <bjorn.a.pettersson@ericsson.com>

[ValueTracking] Fix KnownBits conflict for calls (range vs returned) (#84353)

If a function only exits for certain input values we can still derive
that an argument is "returned". We can also deriv

[ValueTracking] Fix KnownBits conflict for calls (range vs returned) (#84353)

If a function only exits for certain input values we can still derive
that an argument is "returned". We can also derive range metadata that
describe the possible value range returned by the function. However, it
turns out that those two analyses can result in conflicting information.

Example:
declare i16 @foo(i16 returned)
...
%A = call i16 @foo(i16 4095), !range !{i16 32, i16 33}

To avoid "Bits known to be one AND zero?" assertion failures we know
make sure to discard the known bits for this kind of scenario.

show more ...


Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4
# 3b70387c 23-Feb-2024 Yingwei Zheng <dtcxzyw2333@gmail.com>

[ValueTracking] Handle more integer intrinsics in `propagatesPoison` (#82749)

This patch extends `propagatesPoison` to handle more integer intrinsics.
It will turn more logical ands/ors into bitwis

[ValueTracking] Handle more integer intrinsics in `propagatesPoison` (#82749)

This patch extends `propagatesPoison` to handle more integer intrinsics.
It will turn more logical ands/ors into bitwise ands/ors.

See also https://reviews.llvm.org/D99671.

show more ...


Revision tags: llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init
# 55f12299 23-Jan-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

ValueTracking: Recognize fcmp ole/ugt with inf as a class test (#79095)

These were missed and hopefully avoids assertions when
dc3faf0ed0e3f1ea9e435a006167d9649f865da1 is recommitted.


# e414ba33 21-Dec-2023 Nikita Popov <npopov@redhat.com>

[ValueTracking] Shufflevector produces poison rather than undef

Shufflevector semantics have changed so that poison mask elements
return poison rather than undef. Reflect this in the
canCreateUndefO

[ValueTracking] Shufflevector produces poison rather than undef

Shufflevector semantics have changed so that poison mask elements
return poison rather than undef. Reflect this in the
canCreateUndefOrPoison() implementation.

show more ...


# 5c3496ff 05-Dec-2023 Craig Topper <craig.topper@sifive.com>

[InstCombine] Check isGuaranteedNotToBeUndef in haveNoCommonBitsSetSpecialCases. (#74390)

It's not safe for InstCombine to add disjoint metadata when converting
Add to Or otherwise.

I've added n

[InstCombine] Check isGuaranteedNotToBeUndef in haveNoCommonBitsSetSpecialCases. (#74390)

It's not safe for InstCombine to add disjoint metadata when converting
Add to Or otherwise.

I've added noundef attribute to preserve existing test behavior.

show more ...


Revision tags: llvmorg-17.0.6, llvmorg-17.0.5
# 0e1a52f5 14-Nov-2023 Matt Arsenault <Matthew.Arsenault@amd.com>

ValueTracking: Handle compare gt to -inf in class identification (#72086)

This apparently shows up somewhere in chromium. We also are missing a
canonicalization to an equality compare with inf.


Revision tags: llvmorg-17.0.4, llvmorg-17.0.3
# 7a46baa4 05-Oct-2023 Matt Arsenault <Matthew.Arsenault@amd.com>

ValueTracking: Use fcAllFlags for unknown value (#66393)

In the failure case we return null, which callers are checking. We were
also returning an fcNone which was unused. It's more consistent to

ValueTracking: Use fcAllFlags for unknown value (#66393)

In the failure case we return null, which callers are checking. We were
also returning an fcNone which was unused. It's more consistent to
return fcAllFlags as any possible value, such that the value is always
directly usable without checking the returned value.

show more ...


Revision tags: llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init
# 8d385683 05-Jul-2023 Nikita Popov <npopov@redhat.com>

[ValueTracking] Don't handle ptrtoint with mismatches sizes

When processing assumes, we also handle assumes on ptrtoint of the
value. In canonical IR, these will have the same size as the value.
How

[ValueTracking] Don't handle ptrtoint with mismatches sizes

When processing assumes, we also handle assumes on ptrtoint of the
value. In canonical IR, these will have the same size as the value.
However, in non-canonical IR there may be an implicit zext or
trunc, which results in a bit width mismatch. We currently handle
this by adjusting bitwidth everywhere, but this is fragile and I'm
pretty sure that the way we do this is incorrect for some predicates,
because we effectively end up commuting an ext/trunc and an icmp.

Instead, add an m_PtrToIntSameSize() matcher that will only handle
bitwidth preserving cases. For the bitwidth-changing cases, wait
until they have been canonicalized.

The original handling for this was added purely to prevent crashes
in an earlier implementation which failed to account for this
entirely.

show more ...


# 19a35041 26-Jun-2023 Matt Arsenault <Matthew.Arsenault@amd.com>

ValueTracking: Handle !absolute_symbol in computeKnownBits

Use a unit test since I don't see any existing uses try to make use of
the high bits of a pointer.

This will also assert if the metadata t

ValueTracking: Handle !absolute_symbol in computeKnownBits

Use a unit test since I don't see any existing uses try to make use of
the high bits of a pointer.

This will also assert if the metadata type doesn't match the pointer
width, but I consider that a defect in the verifier and shouldn't be
handled.

AMDGPU allocates LDS globals by assigning !absolute_symbol with the
final fixed address. Tracking the high bits are 0 may help with
addressing mode matching.

show more ...


Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3
# 06f94201 25-Apr-2023 Matt Arsenault <Matthew.Arsenault@amd.com>

ValueTracking: Ignore -0 for nsz sqrt with UseInstrInfo in computeKnownFPClass

This avoids a regression when SignBitMustBeZero is moved to computeKnownFPClass.


# cb9b01f9 24-May-2023 Matt Arsenault <Matthew.Arsenault@amd.com>

ValueTracking: Handle compare to nan and -inf constants in fcmpToClassTest

This will help enable a cleanup of simplifyFCmpInst


# f7d1baa4 15-May-2023 Nikita Popov <npopov@redhat.com>

[KnownBits] Return zero instead of unknown for always poison shifts

For always poison shifts, any KnownBits return value is valid.
Currently we return unknown, but returning zero is generally more
p

[KnownBits] Return zero instead of unknown for always poison shifts

For always poison shifts, any KnownBits return value is valid.
Currently we return unknown, but returning zero is generally more
profitable. We had some code in ValueTracking that tried to do this,
but was actually dead code.

Differential Revision: https://reviews.llvm.org/D150648

show more ...


# 5b18d843 18-May-2023 Matt Arsenault <matt@MattBook.local>

Reapply "ValueTracking: Handle phi in computeKnownFPClass"

This reverts commit e13f88d1ff5234946af6349a9a7cf56fcb6c040e.

Fix off by one recursion limit check.


# e13f88d1 18-May-2023 Matt Arsenault <matt@MattBook.local>

Revert "ValueTracking: Handle phi in computeKnownFPClass"

This reverts commit cac9e427eb1ff3dabda8ac08968b998c3bc5ab47.

Causing crashes in lencod


# cac9e427 29-Apr-2023 Matt Arsenault <Matthew.Arsenault@amd.com>

ValueTracking: Handle phi in computeKnownFPClass

Doesn't try the all the tricks computeKnownBits does.


Revision tags: llvmorg-16.0.2
# fe5786d4 09-Apr-2023 Matt Arsenault <Matthew.Arsenault@amd.com>

ValueTracking: Implement computeKnownFPClass for sqrt

Could be slightly smarter in cases that are probably uninteresting.


123456