| OLD | NEW |
| 1 ; This tests each of the supported NaCl atomic instructions for every | 1 ; This tests each of the supported NaCl atomic instructions for every |
| 2 ; size allowed. | 2 ; size allowed. |
| 3 | 3 |
| 4 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \ | 4 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \ |
| 5 ; RUN: -allow-externally-defined-symbols | FileCheck %s | 5 ; RUN: -allow-externally-defined-symbols | FileCheck %s |
| 6 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \ | 6 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \ |
| 7 ; RUN: -allow-externally-defined-symbols | FileCheck --check-prefix=O2 %s | 7 ; RUN: -allow-externally-defined-symbols | FileCheck --check-prefix=O2 %s |
| 8 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \ | 8 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \ |
| 9 ; RUN: -allow-externally-defined-symbols | FileCheck %s | 9 ; RUN: -allow-externally-defined-symbols | FileCheck %s |
| 10 | 10 |
| (...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 define internal i32 @test_atomic_is_lock_free(i32 %iptr) { | 1322 define internal i32 @test_atomic_is_lock_free(i32 %iptr) { |
| 1323 entry: | 1323 entry: |
| 1324 %ptr = inttoptr i32 %iptr to i8* | 1324 %ptr = inttoptr i32 %iptr to i8* |
| 1325 %i = call i1 @llvm.nacl.atomic.is.lock.free(i32 4, i8* %ptr) | 1325 %i = call i1 @llvm.nacl.atomic.is.lock.free(i32 4, i8* %ptr) |
| 1326 %r = zext i1 %i to i32 | 1326 %r = zext i1 %i to i32 |
| 1327 ret i32 %r | 1327 ret i32 %r |
| 1328 } | 1328 } |
| 1329 ; CHECK-LABEL: test_atomic_is_lock_free | 1329 ; CHECK-LABEL: test_atomic_is_lock_free |
| 1330 ; CHECK: mov {{.*}},0x1 | 1330 ; CHECK: mov {{.*}},0x1 |
| 1331 ; ARM32-LABEL: test_atomic_is_lock_free | 1331 ; ARM32-LABEL: test_atomic_is_lock_free |
| 1332 ; ARM32: movw {{.*}}, #1 | 1332 ; ARM32: mov {{.*}}, #1 |
| 1333 | 1333 |
| 1334 define internal i32 @test_not_lock_free(i32 %iptr) { | 1334 define internal i32 @test_not_lock_free(i32 %iptr) { |
| 1335 entry: | 1335 entry: |
| 1336 %ptr = inttoptr i32 %iptr to i8* | 1336 %ptr = inttoptr i32 %iptr to i8* |
| 1337 %i = call i1 @llvm.nacl.atomic.is.lock.free(i32 7, i8* %ptr) | 1337 %i = call i1 @llvm.nacl.atomic.is.lock.free(i32 7, i8* %ptr) |
| 1338 %r = zext i1 %i to i32 | 1338 %r = zext i1 %i to i32 |
| 1339 ret i32 %r | 1339 ret i32 %r |
| 1340 } | 1340 } |
| 1341 ; CHECK-LABEL: test_not_lock_free | 1341 ; CHECK-LABEL: test_not_lock_free |
| 1342 ; CHECK: mov {{.*}},0x0 | 1342 ; CHECK: mov {{.*}},0x0 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1464 br i1 %cmp, label %done, label %body | 1464 br i1 %cmp, label %done, label %body |
| 1465 done: | 1465 done: |
| 1466 ret void | 1466 ret void |
| 1467 } | 1467 } |
| 1468 ; O2-LABEL: test_cmpxchg8b_regalloc | 1468 ; O2-LABEL: test_cmpxchg8b_regalloc |
| 1469 ;;; eax and some other register will be used in the cmpxchg instruction. | 1469 ;;; eax and some other register will be used in the cmpxchg instruction. |
| 1470 ; O2: lock cmpxchg8b QWORD PTR | 1470 ; O2: lock cmpxchg8b QWORD PTR |
| 1471 ;;; Make sure eax/ecx/edx/ebx aren't used again, e.g. as the induction variable. | 1471 ;;; Make sure eax/ecx/edx/ebx aren't used again, e.g. as the induction variable. |
| 1472 ; O2-NOT: {{eax|ecx|edx|ebx}} | 1472 ; O2-NOT: {{eax|ecx|edx|ebx}} |
| 1473 ; O2: pop ebx | 1473 ; O2: pop ebx |
| OLD | NEW |