[PATCH] D122104: [X86][regcall] Support passing / returning structures

Phoebe Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 21 21:36:16 PDT 2022


pengfei added inline comments.


================
Comment at: clang/include/clang/CodeGen/CGFunctionInfo.h:744
+  void setMaxVectorWidth(unsigned Width) {
+    MaxVectorWidth = llvm::Log2_32(Width) + 1;
+  }
----------------
craig.topper wrote:
> Are you assuming Width is a power of 2? Should we assert that?
Good question! I assumed it, but I found it's not true for Clang, although ICC and GCC error for it. 
Maybe we should diagnose it too? Anyway, I added an assert for it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122104



More information about the cfe-commits mailing list