1 ; The register allocator can commute two-address instructions to avoid
2 ; insertion of register-register copies.
4 ; Make sure there are only 3 mov's for each testcase
5 ; RUN: llc < %s -march=x86 -x86-asm-syntax=intel | \
6 ; RUN: grep {\\\<mov\\\>} | count 6
9 target triple = "i686-pc-linux-gnu"
10 @G = external global i32 ; <i32*> [#uses=2]
12 declare void @ext(i32)
14 define i32 @add_test(i32 %X, i32 %Y) {
15 %Z = add i32 %X, %Y ; <i32> [#uses=1]
20 define i32 @xor_test(i32 %X, i32 %Y) {
21 %Z = xor i32 %X, %Y ; <i32> [#uses=1]