1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
3 ; RUN: llc -mtriple=i686-- -mcpu=atom < %s | FileCheck %s
4 ; Check that treemap is read before the asm statement.
6 define i32 @foo(i32 %treemap) nounwind {
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: pushl %eax
10 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
11 ; CHECK-NEXT: movl %eax, %ecx
12 ; CHECK-NEXT: negl %ecx
13 ; CHECK-NEXT: andl %eax, %ecx
14 ; CHECK-NEXT: movl %ecx, (%esp)
16 ; CHECK-NEXT: bsfl (%esp), %eax
18 ; CHECK-NEXT: popl %ecx
21 %sub = sub i32 0, %treemap
22 %and = and i32 %treemap, %sub
23 %0 = call i32 asm "bsfl $1,$0", "=r,rm"(i32 %and)