[clang] [llvm] [RegisterCoalescer] Improve register allocation for return values by limiting rematerialization (PR #163047)
Alexis Engelke via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 15 23:04:07 PDT 2025
================
@@ -202,13 +202,13 @@ define { <4 x i8>, <4 x i1> } @always_usub_const_vector() nounwind {
; SSE-LABEL: always_usub_const_vector:
; SSE: # %bb.0:
; SSE-NEXT: pcmpeqd %xmm0, %xmm0
-; SSE-NEXT: pcmpeqd %xmm1, %xmm1
+; SSE-NEXT: movdqa %xmm0, %xmm1
----------------
aengelke wrote:
Yeah, and I'm asking whether there's evidence that this move is indeed better than zero-idioms. (It could better for the all-ones-idiom pcmpeqd, which still executes as a dependency-breaking uop, but the point is more important w.r.t. zero-idioms (pxor/xorps/xorpd).) Intuitively, I would think that the zero-idiom is preferable over dependencies (even if its just a rename), but I haven't verified this.
https://github.com/llvm/llvm-project/pull/163047
More information about the cfe-commits
mailing list