tahonermann marked an inline comment as done.
tahonermann added inline comments.


================
Comment at: clang/test/CodeGen/attr-target-mv.c:95-111
+// WINDOWS: $foo_used = comdat any
+// WINDOWS: $foo_used2.avx_sse4.2 = comdat any
+// WINDOWS: $pr50025.resolver = comdat any
+// WINDOWS: $pr50025c.resolver = comdat any
+// WINDOWS: $foo_inline.sse4.2 = comdat any
+// WINDOWS: $foo_inline.arch_ivybridge = comdat any
+// WINDOWS: $foo_inline = comdat any
----------------
erichkeane wrote:
> tahonermann wrote:
> > The non-inline non-resolver cases here are surprising to me; they aren't 
> > COMDAT on Linux. Is this intentional?
> I don't think so, we perhaps messed that up.
Actually, I misread the code previously. The non-resolver cases do correspond 
to `inline` function definitions, so it is on the Linux side that these are 
emitted as non-COMDAT symbols. Perhaps it has something to do with ELF vs 
COFF/PE; the linkage and preemption specifiers differ as well (`linkonce` vs 
`linkonce_odr dso_local` as shown below). At any rate, it isn't clear to me 
that there is anything that should be changed here.

Linux:
  define linkonce void @foo_multi(i32 noundef %i, double noundef %d) #12 {
  ...
  define linkonce void @foo_multi.avx_sse4.2(i32 noundef %i, double noundef %d) 
#13 {

Windows:
  $foo_multi = comdat any
  ...
  $foo_multi.avx_sse4.2 = comdat any
  ...
  define linkonce_odr dso_local void @foo_multi(i32 noundef %i, double noundef 
%d) #12 comdat {
  ...
  define linkonce_odr dso_local void @foo_multi.avx_sse4.2(i32 noundef %i, 
double noundef %d) #13 comdat {


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122952

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

Reply via email to