We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f10db27 commit 9e253ccCopy full SHA for 9e253cc
llvm/test/CodeGen/X86/regcoalesce-zeroidiom.ll
@@ -0,0 +1,15 @@
1
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+sse2 | FileCheck %s
3
+
4
+; Test that zero-idiom instructions (like xor %eax, %eax) are rematerialized
5
+; instead of being copied when used as return values. Rematerialization produces
6
+; independent zero-latency instructions which is better than copying.
7
8
+define { i64, i64 } @test_xor_int_two_returns() {
9
+; CHECK-LABEL: test_xor_int_two_returns:
10
+; CHECK: # %bb.0:
11
+; CHECK-NEXT: xorl %eax, %eax
12
+; CHECK-NEXT: xorl %edx, %edx
13
+; CHECK-NEXT: retq
14
+ ret { i64, i64 } { i64 0, i64 0 }
15
+}
0 commit comments