mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
[X86] Simplify check lines in tests. No functional change.
Also, removed unused check lines from test atomic6432.ll. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233181 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
09f1b672cb
commit
3132115738
@ -1,300 +1,207 @@
|
||||
; RUN: llc < %s -O0 -march=x86-64 -mcpu=corei7 -verify-machineinstrs | FileCheck %s --check-prefix X64
|
||||
; RUN: llc < %s -O0 -march=x86 -mcpu=corei7 -verify-machineinstrs | FileCheck %s --check-prefix X32
|
||||
; RUN: llc < %s -O0 -march=x86-64 -mcpu=corei7 -verify-machineinstrs | FileCheck %s -check-prefix=WITH-CMOV
|
||||
; RUN: llc < %s -O0 -march=x86 -mcpu=corei7 -verify-machineinstrs | FileCheck %s -check-prefix=WITH-CMOV
|
||||
; RUN: llc < %s -O0 -march=x86 -mcpu=corei7 -mattr=-cmov -verify-machineinstrs | FileCheck %s --check-prefix NOCMOV
|
||||
|
||||
@sc32 = external global i32
|
||||
|
||||
define void @atomic_fetch_add32() nounwind {
|
||||
; X64-LABEL: atomic_fetch_add32:
|
||||
; X32-LABEL: atomic_fetch_add32:
|
||||
; WITH-CMOV-LABEL: atomic_fetch_add32:
|
||||
entry:
|
||||
; 32-bit
|
||||
%t1 = atomicrmw add i32* @sc32, i32 1 acquire
|
||||
; X64: lock
|
||||
; X64: incl
|
||||
; X32: lock
|
||||
; X32: incl
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: incl
|
||||
%t2 = atomicrmw add i32* @sc32, i32 3 acquire
|
||||
; X64: lock
|
||||
; X64: addl $3
|
||||
; X32: lock
|
||||
; X32: addl $3
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: addl $3
|
||||
%t3 = atomicrmw add i32* @sc32, i32 5 acquire
|
||||
; X64: lock
|
||||
; X64: xaddl
|
||||
; X32: lock
|
||||
; X32: xaddl
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: xaddl
|
||||
%t4 = atomicrmw add i32* @sc32, i32 %t3 acquire
|
||||
; X64: lock
|
||||
; X64: addl
|
||||
; X32: lock
|
||||
; X32: addl
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: addl
|
||||
ret void
|
||||
; X64: ret
|
||||
; X32: ret
|
||||
; WITH-CMOV: ret
|
||||
}
|
||||
|
||||
define void @atomic_fetch_sub32() nounwind {
|
||||
; X64-LABEL: atomic_fetch_sub32:
|
||||
; X32-LABEL: atomic_fetch_sub32:
|
||||
; WITH-CMOV-LABEL: atomic_fetch_sub32:
|
||||
%t1 = atomicrmw sub i32* @sc32, i32 1 acquire
|
||||
; X64: lock
|
||||
; X64: decl
|
||||
; X32: lock
|
||||
; X32: decl
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: decl
|
||||
%t2 = atomicrmw sub i32* @sc32, i32 3 acquire
|
||||
; X64: lock
|
||||
; X64: subl $3
|
||||
; X32: lock
|
||||
; X32: subl $3
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: subl $3
|
||||
%t3 = atomicrmw sub i32* @sc32, i32 5 acquire
|
||||
; X64: lock
|
||||
; X64: xaddl
|
||||
; X32: lock
|
||||
; X32: xaddl
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: xaddl
|
||||
%t4 = atomicrmw sub i32* @sc32, i32 %t3 acquire
|
||||
; X64: lock
|
||||
; X64: subl
|
||||
; X32: lock
|
||||
; X32: subl
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: subl
|
||||
ret void
|
||||
; X64: ret
|
||||
; X32: ret
|
||||
; WITH-CMOV: ret
|
||||
}
|
||||
|
||||
define void @atomic_fetch_and32() nounwind {
|
||||
; X64-LABEL: atomic_fetch_and32:
|
||||
; X32-LABEL: atomic_fetch_and32:
|
||||
; WITH-CMOV-LABEL: atomic_fetch_and32:
|
||||
%t1 = atomicrmw and i32* @sc32, i32 3 acquire
|
||||
; X64: lock
|
||||
; X64: andl $3
|
||||
; X32: lock
|
||||
; X32: andl $3
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: andl $3
|
||||
%t2 = atomicrmw and i32* @sc32, i32 5 acquire
|
||||
; X64: andl
|
||||
; X64: lock
|
||||
; X64: cmpxchgl
|
||||
; X32: andl
|
||||
; X32: lock
|
||||
; X32: cmpxchgl
|
||||
; WITH-CMOV: andl
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: cmpxchgl
|
||||
%t3 = atomicrmw and i32* @sc32, i32 %t2 acquire
|
||||
; X64: lock
|
||||
; X64: andl
|
||||
; X32: lock
|
||||
; X32: andl
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: andl
|
||||
ret void
|
||||
; X64: ret
|
||||
; X32: ret
|
||||
; WITH-CMOV: ret
|
||||
}
|
||||
|
||||
define void @atomic_fetch_or32() nounwind {
|
||||
; X64-LABEL: atomic_fetch_or32:
|
||||
; X32-LABEL: atomic_fetch_or32:
|
||||
; WITH-CMOV-LABEL: atomic_fetch_or32:
|
||||
%t1 = atomicrmw or i32* @sc32, i32 3 acquire
|
||||
; X64: lock
|
||||
; X64: orl $3
|
||||
; X32: lock
|
||||
; X32: orl $3
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: orl $3
|
||||
%t2 = atomicrmw or i32* @sc32, i32 5 acquire
|
||||
; X64: orl
|
||||
; X64: lock
|
||||
; X64: cmpxchgl
|
||||
; X32: orl
|
||||
; X32: lock
|
||||
; X32: cmpxchgl
|
||||
; WITH-CMOV: orl
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: cmpxchgl
|
||||
%t3 = atomicrmw or i32* @sc32, i32 %t2 acquire
|
||||
; X64: lock
|
||||
; X64: orl
|
||||
; X32: lock
|
||||
; X32: orl
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: orl
|
||||
ret void
|
||||
; X64: ret
|
||||
; X32: ret
|
||||
; WITH-CMOV: ret
|
||||
}
|
||||
|
||||
define void @atomic_fetch_xor32() nounwind {
|
||||
; X64-LABEL: atomic_fetch_xor32:
|
||||
; X32-LABEL: atomic_fetch_xor32:
|
||||
; WITH-CMOV-LABEL: atomic_fetch_xor32:
|
||||
%t1 = atomicrmw xor i32* @sc32, i32 3 acquire
|
||||
; X64: lock
|
||||
; X64: xorl $3
|
||||
; X32: lock
|
||||
; X32: xorl $3
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: xorl $3
|
||||
%t2 = atomicrmw xor i32* @sc32, i32 5 acquire
|
||||
; X64: xorl
|
||||
; X64: lock
|
||||
; X64: cmpxchgl
|
||||
; X32: xorl
|
||||
; X32: lock
|
||||
; X32: cmpxchgl
|
||||
; WITH-CMOV: xorl
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: cmpxchgl
|
||||
%t3 = atomicrmw xor i32* @sc32, i32 %t2 acquire
|
||||
; X64: lock
|
||||
; X64: xorl
|
||||
; X32: lock
|
||||
; X32: xorl
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: xorl
|
||||
ret void
|
||||
; X64: ret
|
||||
; X32: ret
|
||||
; WITH-CMOV: ret
|
||||
}
|
||||
|
||||
define void @atomic_fetch_nand32(i32 %x) nounwind {
|
||||
; X64-LABEL: atomic_fetch_nand32:
|
||||
; X32-LABEL: atomic_fetch_nand32:
|
||||
; WITH-CMOV-LABEL: atomic_fetch_nand32:
|
||||
%t1 = atomicrmw nand i32* @sc32, i32 %x acquire
|
||||
; X64: andl
|
||||
; X64: notl
|
||||
; X64: lock
|
||||
; X64: cmpxchgl
|
||||
; X32: andl
|
||||
; X32: notl
|
||||
; X32: lock
|
||||
; X32: cmpxchgl
|
||||
; WITH-CMOV: andl
|
||||
; WITH-CMOV: notl
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: cmpxchgl
|
||||
ret void
|
||||
; X64: ret
|
||||
; X32: ret
|
||||
; WITH-CMOV: ret
|
||||
}
|
||||
|
||||
define void @atomic_fetch_max32(i32 %x) nounwind {
|
||||
; X64-LABEL: atomic_fetch_max32:
|
||||
; X32-LABEL: atomic_fetch_max32:
|
||||
; WITH-CMOV-LABEL: atomic_fetch_max32:
|
||||
|
||||
%t1 = atomicrmw max i32* @sc32, i32 %x acquire
|
||||
; X64: subl
|
||||
; X64: cmov
|
||||
; X64: lock
|
||||
; X64: cmpxchgl
|
||||
|
||||
; X32: subl
|
||||
; X32: cmov
|
||||
; X32: lock
|
||||
; X32: cmpxchgl
|
||||
; WITH-CMOV: subl
|
||||
; WITH-CMOV: cmov
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: cmpxchgl
|
||||
|
||||
; NOCMOV: subl
|
||||
; NOCMOV: jge
|
||||
; NOCMOV: lock
|
||||
; NOCMOV: cmpxchgl
|
||||
ret void
|
||||
; X64: ret
|
||||
; X32: ret
|
||||
; WITH-CMOV: ret
|
||||
; NOCMOV: ret
|
||||
}
|
||||
|
||||
define void @atomic_fetch_min32(i32 %x) nounwind {
|
||||
; X64-LABEL: atomic_fetch_min32:
|
||||
; X32-LABEL: atomic_fetch_min32:
|
||||
; WITH-CMOV-LABEL: atomic_fetch_min32:
|
||||
; NOCMOV-LABEL: atomic_fetch_min32:
|
||||
|
||||
%t1 = atomicrmw min i32* @sc32, i32 %x acquire
|
||||
; X64: subl
|
||||
; X64: cmov
|
||||
; X64: lock
|
||||
; X64: cmpxchgl
|
||||
|
||||
; X32: subl
|
||||
; X32: cmov
|
||||
; X32: lock
|
||||
; X32: cmpxchgl
|
||||
; WITH-CMOV: subl
|
||||
; WITH-CMOV: cmov
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: cmpxchgl
|
||||
|
||||
; NOCMOV: subl
|
||||
; NOCMOV: jle
|
||||
; NOCMOV: lock
|
||||
; NOCMOV: cmpxchgl
|
||||
ret void
|
||||
; X64: ret
|
||||
; X32: ret
|
||||
; WITH-CMOV: ret
|
||||
; NOCMOV: ret
|
||||
}
|
||||
|
||||
define void @atomic_fetch_umax32(i32 %x) nounwind {
|
||||
; X64-LABEL: atomic_fetch_umax32:
|
||||
; X32-LABEL: atomic_fetch_umax32:
|
||||
; WITH-CMOV-LABEL: atomic_fetch_umax32:
|
||||
; NOCMOV-LABEL: atomic_fetch_umax32:
|
||||
|
||||
%t1 = atomicrmw umax i32* @sc32, i32 %x acquire
|
||||
; X64: subl
|
||||
; X64: cmov
|
||||
; X64: lock
|
||||
; X64: cmpxchgl
|
||||
|
||||
; X32: subl
|
||||
; X32: cmov
|
||||
; X32: lock
|
||||
; X32: cmpxchgl
|
||||
; WITH-CMOV: subl
|
||||
; WITH-CMOV: cmov
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: cmpxchgl
|
||||
|
||||
; NOCMOV: subl
|
||||
; NOCMOV: ja
|
||||
; NOCMOV: lock
|
||||
; NOCMOV: cmpxchgl
|
||||
ret void
|
||||
; X64: ret
|
||||
; X32: ret
|
||||
; WITH-CMOV: ret
|
||||
; NOCMOV: ret
|
||||
}
|
||||
|
||||
define void @atomic_fetch_umin32(i32 %x) nounwind {
|
||||
; X64-LABEL: atomic_fetch_umin32:
|
||||
; X32-LABEL: atomic_fetch_umin32:
|
||||
; WITH-CMOV-LABEL: atomic_fetch_umin32:
|
||||
; NOCMOV-LABEL: atomic_fetch_umin32:
|
||||
|
||||
%t1 = atomicrmw umin i32* @sc32, i32 %x acquire
|
||||
; X64: subl
|
||||
; X64: cmov
|
||||
; X64: lock
|
||||
; X64: cmpxchgl
|
||||
|
||||
; X32: subl
|
||||
; X32: cmov
|
||||
; X32: lock
|
||||
; X32: cmpxchgl
|
||||
; WITH-CMOV: subl
|
||||
; WITH-CMOV: cmov
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: cmpxchgl
|
||||
|
||||
; NOCMOV: subl
|
||||
; NOCMOV: jb
|
||||
; NOCMOV: lock
|
||||
; NOCMOV: cmpxchgl
|
||||
ret void
|
||||
; X64: ret
|
||||
; X32: ret
|
||||
; WITH-CMOV: ret
|
||||
; NOCMOV: ret
|
||||
}
|
||||
|
||||
define void @atomic_fetch_cmpxchg32() nounwind {
|
||||
; X64-LABEL: atomic_fetch_cmpxchg32:
|
||||
; X32-LABEL: atomic_fetch_cmpxchg32:
|
||||
; WITH-CMOV-LABEL: atomic_fetch_cmpxchg32:
|
||||
|
||||
%t1 = cmpxchg i32* @sc32, i32 0, i32 1 acquire acquire
|
||||
; X64: lock
|
||||
; X64: cmpxchgl
|
||||
; X32: lock
|
||||
; X32: cmpxchgl
|
||||
; WITH-CMOV: lock
|
||||
; WITH-CMOV: cmpxchgl
|
||||
ret void
|
||||
; X64: ret
|
||||
; X32: ret
|
||||
; WITH-CMOV: ret
|
||||
}
|
||||
|
||||
define void @atomic_fetch_store32(i32 %x) nounwind {
|
||||
; X64-LABEL: atomic_fetch_store32:
|
||||
; X32-LABEL: atomic_fetch_store32:
|
||||
; WITH-CMOV-LABEL: atomic_fetch_store32:
|
||||
|
||||
store atomic i32 %x, i32* @sc32 release, align 4
|
||||
; X64-NOT: lock
|
||||
; X64: movl
|
||||
; X32-NOT: lock
|
||||
; X32: movl
|
||||
; WITH-CMOV-NOT: lock
|
||||
; WITH-CMOV: movl
|
||||
ret void
|
||||
; X64: ret
|
||||
; X32: ret
|
||||
; WITH-CMOV: ret
|
||||
}
|
||||
|
||||
define void @atomic_fetch_swap32(i32 %x) nounwind {
|
||||
; X64-LABEL: atomic_fetch_swap32:
|
||||
; X32-LABEL: atomic_fetch_swap32:
|
||||
; WITH-CMOV-LABEL: atomic_fetch_swap32:
|
||||
|
||||
%t1 = atomicrmw xchg i32* @sc32, i32 %x acquire
|
||||
; X64-NOT: lock
|
||||
; X64: xchgl
|
||||
; X32-NOT: lock
|
||||
; X32: xchgl
|
||||
; WITH-CMOV-NOT: lock
|
||||
; WITH-CMOV: xchgl
|
||||
ret void
|
||||
; X64: ret
|
||||
; X32: ret
|
||||
; WITH-CMOV: ret
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
@sc64 = external global i64
|
||||
|
||||
define void @atomic_fetch_add64() nounwind {
|
||||
; X64-LABEL: atomic_fetch_add64:
|
||||
; X32-LABEL: atomic_fetch_add64:
|
||||
entry:
|
||||
%t1 = atomicrmw add i64* @sc64, i64 1 acquire
|
||||
@ -31,7 +30,6 @@ entry:
|
||||
}
|
||||
|
||||
define void @atomic_fetch_sub64() nounwind {
|
||||
; X64-LABEL: atomic_fetch_sub64:
|
||||
; X32-LABEL: atomic_fetch_sub64:
|
||||
%t1 = atomicrmw sub i64* @sc64, i64 1 acquire
|
||||
; X32: addl $-1
|
||||
@ -58,7 +56,6 @@ define void @atomic_fetch_sub64() nounwind {
|
||||
}
|
||||
|
||||
define void @atomic_fetch_and64() nounwind {
|
||||
; X64-LABEL: atomic_fetch_and:64
|
||||
; X32-LABEL: atomic_fetch_and64:
|
||||
%t1 = atomicrmw and i64* @sc64, i64 3 acquire
|
||||
; X32: andl $3
|
||||
@ -80,7 +77,6 @@ define void @atomic_fetch_and64() nounwind {
|
||||
}
|
||||
|
||||
define void @atomic_fetch_or64() nounwind {
|
||||
; X64-LABEL: atomic_fetch_or64:
|
||||
; X32-LABEL: atomic_fetch_or64:
|
||||
%t1 = atomicrmw or i64* @sc64, i64 3 acquire
|
||||
; X32: orl $3
|
||||
@ -102,7 +98,6 @@ define void @atomic_fetch_or64() nounwind {
|
||||
}
|
||||
|
||||
define void @atomic_fetch_xor64() nounwind {
|
||||
; X64-LABEL: atomic_fetch_xor:64
|
||||
; X32-LABEL: atomic_fetch_xor64:
|
||||
%t1 = atomicrmw xor i64* @sc64, i64 3 acquire
|
||||
; X32: xorl
|
||||
@ -124,7 +119,6 @@ define void @atomic_fetch_xor64() nounwind {
|
||||
}
|
||||
|
||||
define void @atomic_fetch_nand64(i64 %x) nounwind {
|
||||
; X64-LABEL: atomic_fetch_nand64:
|
||||
; X32-LABEL: atomic_fetch_nand64:
|
||||
%t1 = atomicrmw nand i64* @sc64, i64 %x acquire
|
||||
; X32: andl
|
||||
@ -138,7 +132,6 @@ define void @atomic_fetch_nand64(i64 %x) nounwind {
|
||||
}
|
||||
|
||||
define void @atomic_fetch_max64(i64 %x) nounwind {
|
||||
; X64-LABEL: atomic_fetch_max:64
|
||||
; X32-LABEL: atomic_fetch_max64:
|
||||
%t1 = atomicrmw max i64* @sc64, i64 %x acquire
|
||||
; X32: subl
|
||||
@ -152,7 +145,6 @@ define void @atomic_fetch_max64(i64 %x) nounwind {
|
||||
}
|
||||
|
||||
define void @atomic_fetch_min64(i64 %x) nounwind {
|
||||
; X64-LABEL: atomic_fetch_min64:
|
||||
; X32-LABEL: atomic_fetch_min64:
|
||||
%t1 = atomicrmw min i64* @sc64, i64 %x acquire
|
||||
; X32: subl
|
||||
@ -166,7 +158,6 @@ define void @atomic_fetch_min64(i64 %x) nounwind {
|
||||
}
|
||||
|
||||
define void @atomic_fetch_umax64(i64 %x) nounwind {
|
||||
; X64-LABEL: atomic_fetch_umax:64
|
||||
; X32-LABEL: atomic_fetch_umax64:
|
||||
%t1 = atomicrmw umax i64* @sc64, i64 %x acquire
|
||||
; X32: subl
|
||||
@ -180,7 +171,6 @@ define void @atomic_fetch_umax64(i64 %x) nounwind {
|
||||
}
|
||||
|
||||
define void @atomic_fetch_umin64(i64 %x) nounwind {
|
||||
; X64-LABEL: atomic_fetch_umin64:
|
||||
; X32-LABEL: atomic_fetch_umin64:
|
||||
%t1 = atomicrmw umin i64* @sc64, i64 %x acquire
|
||||
; X32: subl
|
||||
@ -194,7 +184,6 @@ define void @atomic_fetch_umin64(i64 %x) nounwind {
|
||||
}
|
||||
|
||||
define void @atomic_fetch_cmpxchg64() nounwind {
|
||||
; X64-LABEL: atomic_fetch_cmpxchg:64
|
||||
; X32-LABEL: atomic_fetch_cmpxchg64:
|
||||
%t1 = cmpxchg i64* @sc64, i64 0, i64 1 acquire acquire
|
||||
; X32: lock
|
||||
@ -204,7 +193,6 @@ define void @atomic_fetch_cmpxchg64() nounwind {
|
||||
}
|
||||
|
||||
define void @atomic_fetch_store64(i64 %x) nounwind {
|
||||
; X64-LABEL: atomic_fetch_store64:
|
||||
; X32-LABEL: atomic_fetch_store64:
|
||||
store atomic i64 %x, i64* @sc64 release, align 8
|
||||
; X32: lock
|
||||
@ -214,7 +202,6 @@ define void @atomic_fetch_store64(i64 %x) nounwind {
|
||||
}
|
||||
|
||||
define void @atomic_fetch_swap64(i64 %x) nounwind {
|
||||
; X64-LABEL: atomic_fetch_swap64:
|
||||
; X32-LABEL: atomic_fetch_swap64:
|
||||
%t1 = atomicrmw xchg i64* @sc64, i64 %x acquire
|
||||
; X32: lock
|
||||
|
Loading…
Reference in New Issue
Block a user