phi-and-select.ll 841 B

123456789101112131415161718192021222324252627282930313233343536
  1. ; RUN: opt < %s -cfl-aa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
  2. ; Derived from (a subset of) BasicAA/phi-and-select.ll
  3. ; CHECK: Function: qux
  4. ; CHECK: NoAlias: double* %a, double* %b
  5. ; CHECK: ===== Alias Analysis Evaluator Report =====
  6. ; Two PHIs with disjoint sets of inputs.
  7. define void @qux(i1 %m, double* noalias %x, double* noalias %y,
  8. i1 %n, double* noalias %v, double* noalias %w) {
  9. entry:
  10. br i1 %m, label %true, label %false
  11. true:
  12. br label %exit
  13. false:
  14. br label %exit
  15. exit:
  16. %a = phi double* [ %x, %true ], [ %y, %false ]
  17. br i1 %n, label %ntrue, label %nfalse
  18. ntrue:
  19. br label %nexit
  20. nfalse:
  21. br label %nexit
  22. nexit:
  23. %b = phi double* [ %v, %ntrue ], [ %w, %nfalse ]
  24. store volatile double 0.0, double* %a
  25. store volatile double 1.0, double* %b
  26. ret void
  27. }