• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; PR13504
2; RUN: llc -mtriple=i686-- -mcpu=atom < %s | FileCheck %s
3; Check that treemap is read before the asm statement.
4; CHECK: movl 8(%{{esp|ebp}})
5; CHECK: bsfl
6; CHECK-NOT: movl 8(%{{esp|ebp}})
7
8define i32 @foo(i32 %treemap) nounwind uwtable {
9entry:
10  %sub = sub i32 0, %treemap
11  %and = and i32 %treemap, %sub
12  %0 = tail call i32 asm "bsfl $1,$0\0A\09", "=r,rm,~{dirflag},~{fpsr},~{flags}"(i32 %and) nounwind
13  ret i32 %0
14}
15
16