erichkeane added subscribers: FreddyYe, craig.topper.
erichkeane added a comment.

Hi-
We've actually seen some regressions internally thanks to this patch, which 
boil down to:

https://godbolt.org/z/WEer4M6ha

  // compiled with -march=skylake
  __attribute__((always_inline)) inline void foo(){}
  
  __attribute__((target("arch=core-avx2")))
  void bar() {
  foo();
  }

I believe @craig.topper and I spent a long time on these things, but I'm now 
questioning what `arch=` is supposed to do in this case.  We're compiling `bar` 
as if it is an avx2 function, so it cannot call `foo`, which has additional 
features. However, they were not 'disabled'.  A part of me thinks that the 
`arch=...` should mean "has at least these features", and the bug is thus in 
the code that sets the features list.

What does everyone think?  attn: @FreddyYe


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143479

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to