Home | History | Annotate | Download | only in X86
      1 ; RUN: llc -march=x86-64 -no-integrated-as < %s | FileCheck %s
      2 ; PR3701
      3 
      4 define i64 @t(i64* %arg) nounwind {
      5         br i1 true, label %1, label %5
      6 
      7 ; <label>:1             ; preds = %0
      8         %2 = icmp eq i64* null, %arg            ; <i1> [#uses=1]
      9         %3 = tail call i64* asm sideeffect "movl %fs:0,$0", "=r,~{dirflag},~{fpsr},~{flags}"() nounwind         ; <%struct.thread*> [#uses=0]
     10 ; CHECK: test
     11 ; CHECK-NEXT: j
     12         br i1 %2, label %4, label %5
     13 
     14 ; <label>:4             ; preds = %1
     15         ret i64 1
     16 
     17 ; <label>:5             ; preds = %1
     18         ret i64 0
     19 }
     20 
     21 ; Make sure that we translate this to the bswap intrinsic which lowers down without the
     22 ; inline assembly.
     23 ; CHECK-NOT: #APP
     24 define i32 @s(i32 %argc, i8** nocapture %argv) unnamed_addr nounwind {
     25 entry:
     26   %0 = trunc i32 %argc to i16
     27   %asmtmp = tail call i16 asm "rorw $$8, ${0:w}", "=r,0,~{fpsr},~{flags},~{cc}"(i16 %0) nounwind, !srcloc !0
     28   %1 = zext i16 %asmtmp to i32
     29   ret i32 %1
     30 }
     31 
     32 !0 = !{i64 935930}
     33