<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 1, 2011, at 8:17 PM, Francois Pichet wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Optima; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><blockquote type="cite">+; CHECK:        xorl %eax, %eax<br></blockquote><blockquote type="cite">+; CHECK-NEXT:   align<br></blockquote><blockquote type="cite">+; CHECK-NEXT: BB0_1:<br></blockquote><blockquote type="cite">+; CHECK-NEXT:   movq  %rax, (%rdx)<br></blockquote><blockquote type="cite">+; CHECK-NEXT:   addq  %rsi, %rax<br></blockquote><blockquote type="cite">+; CHECK-NEXT:   cmpq  %rdi, %rax<br></blockquote><blockquote type="cite">+; CHECK-NEXT:   jl<br></blockquote><blockquote type="cite">+; CHECK-NEXT:   imulq %rax, %rax<br></blockquote><blockquote type="cite">+; CHECK-NEXT:   ret<br></blockquote><br>This fails under MSVC:<br>The output is instead:<br>foo:<br>       xorl    %eax, %eax<br>       .align  16, 0x90<br>.LBB0_1:<br>       movq    %rax, (%r8)<br>       addq    %rdx, %rax<br>       cmpq    %rcx, %rax<br>       jl      .LBB0_1<br>       imulq   %rax, %rax<br>       ret<br><br>Any idea?<br></div></span></blockquote></div><br><div>Unit tests should only mention explicit registers when a specific register is required for correctness.</div><div><br></div><div>Otherwise, use FileCheck variables.</div><div><br></div><div>One of these days, I am going to add -regalloc=random…</div><div><br></div><div>/jakob</div><div><br></div></body></html>