summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/pr21099.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/pr21099.ll')
-rw-r--r--test/CodeGen/X86/pr21099.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/X86/pr21099.ll b/test/CodeGen/X86/pr21099.ll
new file mode 100644
index 000000000000..07292c125eea
--- /dev/null
+++ b/test/CodeGen/X86/pr21099.ll
@@ -0,0 +1,10 @@
+; RUN: llc < %s -O2 -march=x86-64 -verify-machineinstrs | FileCheck %s
+
+define void @pr21099(i64* %p) {
+; CHECK-LABEL: pr21099
+; CHECK: lock
+; CHECK-NEXT: addq $-2147483648
+; This number is INT32_MIN: 0x80000000UL
+ %1 = atomicrmw add i64* %p, i64 -2147483648 seq_cst
+ ret void
+}