craig.topper added inline comments.

================
Comment at: llvm/lib/CodeGen/PrologEpilogInserter.cpp:1182
+
+  if (!F.hasFnAttribute("zero-call-used-regs") ||
+      // No need to zero call regs in main().
----------------
Should the frontend avoid putting the attribute on "main" instead of making a 
special case in the backend?


================
Comment at: llvm/test/CodeGen/X86/zero-call-used-regs-fmod.ll:15
+; CHECK-NEXT:    xorps %xmm1, %xmm1
+; CHECK-NEXT:    popq %rax
+; CHECK-NEXT:    .cfi_def_cfa_offset 8
----------------
Is it ok that this popq popped garbage into the %rax after you cleared it? It's 
not the return value of the function. That's xmm0. This is just a popq because 
its a shorter encoding than `sub 8, %esp`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110869

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

Reply via email to