[PATCH] D85592: [Attributor] Add flag for undef value to the state of AAPotentialValues

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 10:45:52 PDT 2020


jdoerfert added a comment.

What happens if you have something like

  int foo(int c0, int c1, int c2, int c3) {
     int undef;
     int x0 = c0 ? 0 : 1;
     int x1 = c1 ? x0 : undef;
     int y2 = c2 ? 0 : 7;
     int z3 = c3 ? x1 : y2;
     return z3 < 7;
  }
  
  int bar(int c0, int c1 ) {
     int undef;
     int x0 = c0 ? 0 : 1;
     int x1 = c1 ? x0 : undef;
     return x1 == 7;
  }
  int bar(int c0, int c1 ) {
     int undef;
     int x0 = c0 ? 0 : undef;
     int x1 = c1 ? x0 : 1;
     return x1 == 7;
  }


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85592/new/

https://reviews.llvm.org/D85592



More information about the llvm-commits mailing list