[Attributor][FIX] Remove FIXME that seems outdated

The change is performed as stated by the FIXME and the tests are
adjusted. All changes look fine to me and values can be inferred as
undef without it being an error.
This commit is contained in:
Johannes Doerfert 2020-02-09 20:21:56 -06:00
parent 7e7e6594b3
commit 63adbb9a0e
4 changed files with 6 additions and 9 deletions

View File

@ -4408,9 +4408,7 @@ struct AAValueSimplifyImpl : AAValueSimplify {
else
return false;
} else {
// FIXME: It should be llvm::None but if you set llvm::None,
// values are mistakenly infered as `undef` now.
SimplifiedAssociatedValue = &getAssociatedValue();
SimplifiedAssociatedValue = llvm::None;
}
return true;
}

View File

@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
; RUN: opt -S -passes=attributor -aa-pipeline='basic-aa' -attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=3 < %s | FileCheck %s
; RUN: opt -S -passes=attributor -aa-pipeline='basic-aa' -attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=1 < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

View File

@ -1,6 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -attributor -attributor-manifest-internal --attributor-disable=false -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=5 -S < %s | FileCheck %s --check-prefix=ATTRIBUTOR
; RUN: opt -attributor -attributor-manifest-internal --attributor-disable=false -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=16 -S < %s | FileCheck %s --check-prefix=ATTRIBUTOR
; FIXME: Figure out why we need 16 iterations here.
declare void @deref_phi_user(i32* %a);

View File

@ -265,15 +265,14 @@ e:
; Branch on undef that depends on propagation of
; undef of a previous instruction.
; FIXME: Currently it doesn't propagate the undef.
define i32 @cond_br_on_undef3() {
; ATTRIBUTOR-LABEL: @cond_br_on_undef3(
; ATTRIBUTOR-NEXT: %cond = icmp ne i32 1, undef
; ATTRIBUTOR-NEXT: br i1 %cond, label %t, label %e
; ATTRIBUTOR: t:
; ATTRIBUTOR-NEXT: ret i32 1
; ATTRIBUTOR-NEXT: unreachable
; ATTRIBUTOR: e:
; ATTRIBUTOR-NEXT: ret i32 2
; ATTRIBUTOR-NEXT: unreachable
%cond = icmp ne i32 1, undef
br i1 %cond, label %t, label %e