[PATCH] D102153: [SelectionDAG] Fix argument copy elision with irregular types

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 13:27:36 PDT 2021


rnk added a comment.

I don't see why this optimization should be declared illegal. Why isn't it the caller's responsibility to store these narrow integers canonically? C doesn't have narrow integers, but GCC doesn't do this. If a variable is passed in memory, it just uses the memory that was passed into it.



================
Comment at: llvm/test/CodeGen/X86/arg-copy-elide.ll:80
+; CHECK-NEXT:    andb $1, %al
+; CHECK-NEXT:    movb %al, {{[0-9]+}}(%esp)
 ; CHECK-NEXT:    leal {{[0-9]+}}(%esp), %eax
----------------
We don't want this, do we? Seems like it would be a regression.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102153



More information about the llvm-commits mailing list