@@ -27,18 +27,16 @@ define i8 @add8(ptr %p) {
27
27
;
28
28
; X86-SLM-LABEL: add8:
29
29
; X86-SLM: # %bb.0:
30
- ; X86-SLM-NEXT: movl {{[0-9]+}}(%esp), %ecx
31
- ; X86-SLM-NEXT: xorl %eax, %eax
32
- ; X86-SLM-NEXT: lock xaddb %al, (%ecx)
33
- ; X86-SLM-NEXT: # kill: def $al killed $al killed $eax
30
+ ; X86-SLM-NEXT: movl {{[0-9]+}}(%esp), %eax
31
+ ; X86-SLM-NEXT: lock orl $0, (%esp)
32
+ ; X86-SLM-NEXT: movzbl (%eax), %eax
34
33
; X86-SLM-NEXT: retl
35
34
;
36
35
; X86-ATOM-LABEL: add8:
37
36
; X86-ATOM: # %bb.0:
38
- ; X86-ATOM-NEXT: movl {{[0-9]+}}(%esp), %ecx
39
- ; X86-ATOM-NEXT: xorl %eax, %eax
40
- ; X86-ATOM-NEXT: lock xaddb %al, (%ecx)
41
- ; X86-ATOM-NEXT: # kill: def $al killed $al killed $eax
37
+ ; X86-ATOM-NEXT: movl {{[0-9]+}}(%esp), %eax
38
+ ; X86-ATOM-NEXT: lock orl $0, (%esp)
39
+ ; X86-ATOM-NEXT: movzbl (%eax), %eax
42
40
; X86-ATOM-NEXT: nop
43
41
; X86-ATOM-NEXT: nop
44
42
; X86-ATOM-NEXT: retl
@@ -62,26 +60,18 @@ define i16 @or16(ptr %p) {
62
60
;
63
61
; X86-SLM-LABEL: or16:
64
62
; X86-SLM: # %bb.0:
65
- ; X86-SLM-NEXT: movl {{[0-9]+}}(%esp), %ecx
66
- ; X86-SLM-NEXT: movzwl (%ecx), %eax
67
- ; X86-SLM-NEXT: .p2align 4, 0x90
68
- ; X86-SLM-NEXT: .LBB1_1: # %atomicrmw.start
69
- ; X86-SLM-NEXT: # =>This Inner Loop Header: Depth=1
70
- ; X86-SLM-NEXT: lock cmpxchgw %ax, (%ecx)
71
- ; X86-SLM-NEXT: jne .LBB1_1
72
- ; X86-SLM-NEXT: # %bb.2: # %atomicrmw.end
63
+ ; X86-SLM-NEXT: movl {{[0-9]+}}(%esp), %eax
64
+ ; X86-SLM-NEXT: lock orl $0, (%esp)
65
+ ; X86-SLM-NEXT: movzwl (%eax), %eax
73
66
; X86-SLM-NEXT: retl
74
67
;
75
68
; X86-ATOM-LABEL: or16:
76
69
; X86-ATOM: # %bb.0:
77
- ; X86-ATOM-NEXT: movl {{[0-9]+}}(%esp), %ecx
78
- ; X86-ATOM-NEXT: movzwl (%ecx), %eax
79
- ; X86-ATOM-NEXT: .p2align 4, 0x90
80
- ; X86-ATOM-NEXT: .LBB1_1: # %atomicrmw.start
81
- ; X86-ATOM-NEXT: # =>This Inner Loop Header: Depth=1
82
- ; X86-ATOM-NEXT: lock cmpxchgw %ax, (%ecx)
83
- ; X86-ATOM-NEXT: jne .LBB1_1
84
- ; X86-ATOM-NEXT: # %bb.2: # %atomicrmw.end
70
+ ; X86-ATOM-NEXT: movl {{[0-9]+}}(%esp), %eax
71
+ ; X86-ATOM-NEXT: lock orl $0, (%esp)
72
+ ; X86-ATOM-NEXT: movzwl (%eax), %eax
73
+ ; X86-ATOM-NEXT: nop
74
+ ; X86-ATOM-NEXT: nop
85
75
; X86-ATOM-NEXT: retl
86
76
%1 = atomicrmw or ptr %p , i16 0 acquire
87
77
ret i16 %1
@@ -103,26 +93,18 @@ define i32 @xor32(ptr %p) {
103
93
;
104
94
; X86-SLM-LABEL: xor32:
105
95
; X86-SLM: # %bb.0:
106
- ; X86-SLM-NEXT: movl {{[0-9]+}}(%esp), %ecx
107
- ; X86-SLM-NEXT: movl (%ecx), %eax
108
- ; X86-SLM-NEXT: .p2align 4, 0x90
109
- ; X86-SLM-NEXT: .LBB2_1: # %atomicrmw.start
110
- ; X86-SLM-NEXT: # =>This Inner Loop Header: Depth=1
111
- ; X86-SLM-NEXT: lock cmpxchgl %eax, (%ecx)
112
- ; X86-SLM-NEXT: jne .LBB2_1
113
- ; X86-SLM-NEXT: # %bb.2: # %atomicrmw.end
96
+ ; X86-SLM-NEXT: movl {{[0-9]+}}(%esp), %eax
97
+ ; X86-SLM-NEXT: lock orl $0, (%esp)
98
+ ; X86-SLM-NEXT: movl (%eax), %eax
114
99
; X86-SLM-NEXT: retl
115
100
;
116
101
; X86-ATOM-LABEL: xor32:
117
102
; X86-ATOM: # %bb.0:
118
- ; X86-ATOM-NEXT: movl {{[0-9]+}}(%esp), %ecx
119
- ; X86-ATOM-NEXT: movl (%ecx), %eax
120
- ; X86-ATOM-NEXT: .p2align 4, 0x90
121
- ; X86-ATOM-NEXT: .LBB2_1: # %atomicrmw.start
122
- ; X86-ATOM-NEXT: # =>This Inner Loop Header: Depth=1
123
- ; X86-ATOM-NEXT: lock cmpxchgl %eax, (%ecx)
124
- ; X86-ATOM-NEXT: jne .LBB2_1
125
- ; X86-ATOM-NEXT: # %bb.2: # %atomicrmw.end
103
+ ; X86-ATOM-NEXT: movl {{[0-9]+}}(%esp), %eax
104
+ ; X86-ATOM-NEXT: lock orl $0, (%esp)
105
+ ; X86-ATOM-NEXT: movl (%eax), %eax
106
+ ; X86-ATOM-NEXT: nop
107
+ ; X86-ATOM-NEXT: nop
126
108
; X86-ATOM-NEXT: retl
127
109
%1 = atomicrmw xor ptr %p , i32 0 release
128
110
ret i32 %1
@@ -318,26 +300,18 @@ define i32 @and32 (ptr %p) {
318
300
;
319
301
; X86-SLM-LABEL: and32:
320
302
; X86-SLM: # %bb.0:
321
- ; X86-SLM-NEXT: movl {{[0-9]+}}(%esp), %ecx
322
- ; X86-SLM-NEXT: movl (%ecx), %eax
323
- ; X86-SLM-NEXT: .p2align 4, 0x90
324
- ; X86-SLM-NEXT: .LBB5_1: # %atomicrmw.start
325
- ; X86-SLM-NEXT: # =>This Inner Loop Header: Depth=1
326
- ; X86-SLM-NEXT: lock cmpxchgl %eax, (%ecx)
327
- ; X86-SLM-NEXT: jne .LBB5_1
328
- ; X86-SLM-NEXT: # %bb.2: # %atomicrmw.end
303
+ ; X86-SLM-NEXT: movl {{[0-9]+}}(%esp), %eax
304
+ ; X86-SLM-NEXT: lock orl $0, (%esp)
305
+ ; X86-SLM-NEXT: movl (%eax), %eax
329
306
; X86-SLM-NEXT: retl
330
307
;
331
308
; X86-ATOM-LABEL: and32:
332
309
; X86-ATOM: # %bb.0:
333
- ; X86-ATOM-NEXT: movl {{[0-9]+}}(%esp), %ecx
334
- ; X86-ATOM-NEXT: movl (%ecx), %eax
335
- ; X86-ATOM-NEXT: .p2align 4, 0x90
336
- ; X86-ATOM-NEXT: .LBB5_1: # %atomicrmw.start
337
- ; X86-ATOM-NEXT: # =>This Inner Loop Header: Depth=1
338
- ; X86-ATOM-NEXT: lock cmpxchgl %eax, (%ecx)
339
- ; X86-ATOM-NEXT: jne .LBB5_1
340
- ; X86-ATOM-NEXT: # %bb.2: # %atomicrmw.end
310
+ ; X86-ATOM-NEXT: movl {{[0-9]+}}(%esp), %eax
311
+ ; X86-ATOM-NEXT: lock orl $0, (%esp)
312
+ ; X86-ATOM-NEXT: movl (%eax), %eax
313
+ ; X86-ATOM-NEXT: nop
314
+ ; X86-ATOM-NEXT: nop
341
315
; X86-ATOM-NEXT: retl
342
316
%1 = atomicrmw and ptr %p , i32 -1 acq_rel
343
317
ret i32 %1
0 commit comments