Commit 63adbb9a authored by Johannes Doerfert's avatar Johannes Doerfert
Browse files

[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.
parent 7e7e6594
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;
  }
+1 −1
Original line number Diff line number Diff line
; 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"
+2 −2
Original line number Diff line number Diff line
; 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);

+2 −3
Original line number Diff line number Diff line
@@ -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