erichkeane added inline comments.
================ Comment at: clang/test/CodeGen/func-attr.c:1 -// RUN: %clang -c -ffast-math -emit-llvm -S -o - %s \ -// RUN: | FileCheck %s +// RUN: %clang -c -O2 -target x86_64 -ffast-math\ +// RUN: -emit-llvm -S -o - %s | FileCheck %s ---------------- zahiraam wrote: > erichkeane wrote: > > It isn't really appropriate to add an opt-level to the test, and it doesn't > > really depend on it. I don't really understand @saugustine 's request in > > the other thread: MOST of the clang-codegen tests aren't supposed to have > > opt-levels added to them, and will fail because of it. > > > > So I'm unshocked that adding '-O2' to a test would cause it to fail. Clang > > tests are generally NOT supposed to be run with an opt-setting. > I did notice that the there is some extra information generated before the > attribute at the function define when Ox (x>0) is used. I don't believe that is unexpected. The wildcard there is likely fine (though you might want to remove a space either before or after it in case that is not generated), or add --disable-llvm-passes to this if the original patch would only really 'work' at certain opt-levels, but having it run opt is going to cause problems downstream, and makes these tests very sensitive to what the middle/backends do. But running opt on a CodeGen test isn't really appropriate. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136084/new/ https://reviews.llvm.org/D136084 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits