optimization-remark-extra-analysis.c 337 B

1234567891011
  1. // Test that the is*RemarkEnabled overrides are working properly. This remark
  2. // requiring extra analysis is only conditionally enabled.
  3. // RUN: %clang_cc1 %s -Rpass-missed=gvn -O2 -emit-llvm-only -verify
  4. int foo(int *x, int *y) {
  5. int a = *x;
  6. *y = 2;
  7. // expected-remark@+1 {{load of type i32 not eliminated}}
  8. return a + *x;
  9. }