comparison test/CodeGen/X86/2009-10-19-atomic-cmp-eflags.ll @ 134:3a76565eade5 LLVM5.0.1

update 5.0.1
author mir3636
date Sat, 17 Feb 2018 09:57:20 +0900
parents afa8332a0e37
children c2174574ed3a
comparison
equal deleted inserted replaced
133:c60214abe0e8 134:3a76565eade5
1 ; RUN: llvm-as <%s | llc | FileCheck %s 1 ; RUN: llvm-as <%s | llc | FileCheck %s
2 ; PR 5247 2 ; PR 5247
3 ; check that cmp is not scheduled before the add 3 ; check that cmp/test is not scheduled before the add
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" 4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
5 target triple = "x86_64-unknown-linux-gnu" 5 target triple = "x86_64-unknown-linux-gnu"
6 6
7 @.str76843 = external constant [45 x i8] ; <[45 x i8]*> [#uses=1] 7 @.str76843 = external constant [45 x i8] ; <[45 x i8]*> [#uses=1]
8 @__profiling_callsite_timestamps_live = external global [1216 x i64] ; <[1216 x i64]*> [#uses=2] 8 @__profiling_callsite_timestamps_live = external global [1216 x i64] ; <[1216 x i64]*> [#uses=2]
36 call void asm sideeffect "cpuid", "~{ax},~{bx},~{cx},~{dx},~{memory},~{dirflag},~{fpsr},~{flags}"() nounwind 36 call void asm sideeffect "cpuid", "~{ax},~{bx},~{cx},~{dx},~{memory},~{dirflag},~{fpsr},~{flags}"() nounwind
37 %4 = call i64 @llvm.readcyclecounter() nounwind ; <i64> [#uses=1] 37 %4 = call i64 @llvm.readcyclecounter() nounwind ; <i64> [#uses=1]
38 %5 = sub i64 %4, %2 ; <i64> [#uses=1] 38 %5 = sub i64 %4, %2 ; <i64> [#uses=1]
39 %6 = atomicrmw add i64* getelementptr inbounds ([1216 x i64], [1216 x i64]* @__profiling_callsite_timestamps_live, i32 0, i32 51), i64 %5 monotonic 39 %6 = atomicrmw add i64* getelementptr inbounds ([1216 x i64], [1216 x i64]* @__profiling_callsite_timestamps_live, i32 0, i32 51), i64 %5 monotonic
40 ;CHECK: lock {{xadd|addq}} %rdx, __profiling_callsite_timestamps_live 40 ;CHECK: lock {{xadd|addq}} %rdx, __profiling_callsite_timestamps_live
41 ;CHECK-NEXT: cmpl $0, 41 ;CHECK-NEXT: testl [[REG:%e[a-z]+]], [[REG]]
42 ;CHECK-NEXT: jne 42 ;CHECK-NEXT: jne
43 %cmp = icmp eq i32 %3, 0 ; <i1> [#uses=1] 43 %cmp = icmp eq i32 %3, 0 ; <i1> [#uses=1]
44 br i1 %cmp, label %if.then, label %if.end 44 br i1 %cmp, label %if.then, label %if.end
45 45
46 if.then: ; preds = %lt_init.exit 46 if.then: ; preds = %lt_init.exit