llvm-project/llvm/test/Analysis/ValueTracking
Hal Finkel b03dd4be70 [ValueTracking] Don't delete assumes of side-effectful instructions
ValueTracking has to strike a balance when attempting to propagate information
backwards from assumes, because if the information is trivially propagated
backwards, it can appear to LLVM that the assumption is known to be true, and
therefore can be removed.

This is sound (because an assumption has no semantic effect except for causing
UB), but prevents the assume from allowing further optimizations.

The isEphemeralValueOf check exists to try and prevent this issue by not
removing the source of an assumption. This tries to make it a little bit more
general to handle the case of side-effectful instructions, such as in

  %0 = call i1 @get_val()
  %1 = xor i1 %0, true
  call void @llvm.assume(i1 %1)

Patch by Ariel Ben-Yehuda, thanks!

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

llvm-svn: 310859
2017-08-14 17:11:43 +00:00
..
assume.ll [ValueTracking] Don't delete assumes of side-effectful instructions 2017-08-14 17:11:43 +00:00
deref-bitcast-of-gep.ll
dereferenceable-and-aligned.ll [Loads] Fix crash in is isDereferenceableAndAlignedPointer() 2016-10-28 15:32:28 +00:00
get-pointer-base-with-const-off.ll [ValueTracking] Fix crash in GetPointerBaseWithConstantOffset() 2016-10-07 14:23:29 +00:00
known-bits-from-range-md.ll
known-non-equal.ll
known-nonnull-at.ll [ValueTracking] use nonnull argument attribute to eliminate null checks 2017-02-12 15:35:34 +00:00
known-power-of-two.ll
known-signbit-shift.ll The patch improves ValueTracking on left shift with nsw flag. 2016-08-24 23:01:33 +00:00
knownnonzero-shift.ll
knownzero-addrspacecast.ll Fix known zero bits for addrspacecast. 2016-11-21 15:42:31 +00:00
knownzero-shift.ll [InstSimplify] allow integer vector types to use computeKnownBits 2016-11-27 21:07:28 +00:00
memory-dereferenceable.ll Teach isDereferenceablePointer to look through returned-argument functions 2016-07-11 03:08:49 +00:00
monotonic-phi.ll
pr23011.ll
signbits-extract-elt.ll [ValueTracking] Teach computeKnownBits and ComputeNumSignBits to look through ExtractElement. 2016-10-06 09:56:21 +00:00