================
@@ -3061,13 +3061,9 @@ void CodeGenModule::ConstructAttributeList(StringRef 
Name,
       //
       // This is different from indirect *not* byval, where the object
       // exists already, and the align attribute is purely
-      // informative.
+      // informative (but is still useful for optimization passes).
----------------
sivakusayan wrote:

(Sorry for deleting my comment, I thought I misread the code for a second and 
wanted to double check)

Yes, we know this from this [chunk of 
code](https://github.com/llvm/llvm-project/blob/1f10f1ca8af3dff956b353d7ff3ea169c82ed909/clang/lib/CodeGen/CGCall.cpp#L5639).
 In particular, since we aren't byval we [create the aligned temporary 
here](https://github.com/llvm/llvm-project/blob/1f10f1ca8af3dff956b353d7ff3ea169c82ed909/clang/lib/CodeGen/CGCall.cpp#L5713).
 We can see an example of this by running the code sample from the linked issue 
[through Godbolt](https://godbolt.org/z/nqreGnKGT), and looking at the top of 
the unoptimized `qux()`.

Let me add a better comment here, maybe there is an additional assertion I can 
add here too.

https://github.com/llvm/llvm-project/pull/201999
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to