llvm-project/llvm/test/Transforms/Attributor
Johannes Doerfert dd101c808b [Attributor][FIX] Do not use assumed information for UB detection
The helper `Attributor::checkForAllReturnedValuesAndReturnInsts`
simplifies the returned value optimistically. In `AAUndefinedBehavior`
we cannot use such optimistic values when deducing UB. As a result, we
assumed UB for the return value of a function because we initially
(=optimistically) thought the function return is `undef`. While we later
adjusted this properly, the `AAUndefinedBehavior` was under the
impression the return value is "known" (=fix) and could never change.

To correct this we use `Attributor::checkForAllInstructions` and then
manually to perform simplification of the return value, only allowing
known values to be used. This actually matches the other UB deductions.

Fixes #53647
2022-02-07 20:19:19 -06:00
..
ArgumentPromotion [Attributor] Introduce the `AA::isPotentiallyReachable` helper APIs 2022-02-01 01:40:45 -06:00
IPConstantProp [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
reduced [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
align.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
allow_list.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
alwaysinline.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
assumes_info.ll [Attributor][FIX] Liveness handling in the isAssumedDead helpers 2022-02-01 01:18:52 -06:00
callbacks.ll [Attributor] Make interprocedural value explicit in genericValueTraversal 2022-02-01 01:40:44 -06:00
callgraph.ll Attributor: Fix crash on undef in !callees 2021-09-14 19:49:34 -04:00
cb_liveness_disabled.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
cb_liveness_enabled.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
cb_range_disabled.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
cb_range_enabled.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
cgscc_bugs.ll [Attributor][FIX] Liveness handling in the isAssumedDead helpers 2022-02-01 01:18:52 -06:00
chain.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
depgraph.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
dereferenceable-1.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
dereferenceable-2-inseltpoison.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
dereferenceable-2.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
heap_to_stack.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
heap_to_stack_gpu.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
internal-noalias.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
internalize.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
lit.local.cfg [FileCheck] Default --allow-unused-prefixes to false 2021-02-08 13:37:04 -08:00
liveness.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
liveness_chains.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
lowerheap.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
lvi-after-jumpthreading.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
lvi-for-ashr.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
memory_locations.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
misc.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
misc_crash.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
new_attributes.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
noalias.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
nocapture-1.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
nocapture-2.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
nodelete.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
nofree.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
nonnull.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
norecurse.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
noreturn.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
noreturn_async.ll [Attributor] Make interprocedural value explicit in genericValueTraversal 2022-02-01 01:40:44 -06:00
noreturn_sync.ll [Attributor][FIX] Liveness handling in the isAssumedDead helpers 2022-02-01 01:18:52 -06:00
nosync.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
noundef.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
nounwind.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
openmp_parallel.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
potential.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
range.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
read_write_returned_arguments_scc.ll [Attributor] Introduce the `AA::isPotentiallyReachable` helper APIs 2022-02-01 01:40:45 -06:00
readattrs.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
returned.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
undefined_behavior.ll [Attributor][FIX] Do not use assumed information for UB detection 2022-02-07 20:19:19 -06:00
value-simplify-gpu.ll [Attributor] Introduce the `AA::isPotentiallyReachable` helper APIs 2022-02-01 01:40:45 -06:00
value-simplify-instances.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
value-simplify-pointer-info.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
value-simplify.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
willreturn.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
wrapper.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00