[PATCH] D145933: [X86] Add negative test for D145930

Nabeel Omer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 04:41:19 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGd8c2a10297f1: [X86] Add negative test for D145930 (authored by n-omer).

Changed prior to commit:
  https://reviews.llvm.org/D145933?vs=504703&id=505033#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145933/new/

https://reviews.llvm.org/D145933

Files:
  llvm/test/CodeGen/X86/pr61384.ll


Index: llvm/test/CodeGen/X86/pr61384.ll
===================================================================
--- /dev/null
+++ llvm/test/CodeGen/X86/pr61384.ll
@@ -0,0 +1,19 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=x86_64-unknown-linux-gnu -show-mc-encoding < %s | FileCheck %s
+
+ at a = external dso_local global { { i64 } }
+
+define i32 @atomic_global() nounwind {
+; CHECK-LABEL: atomic_global:
+; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    xorl %eax, %eax # encoding: [0x31,0xc0]
+; CHECK-NEXT:    lock btsq %rax, a(%rip) # encoding: [0xf0,0x48,0x0f,0xab,0x05,A,A,A,A]
+; CHECK-NEXT:    # fixup A - offset: 5, value: a-5, kind: reloc_riprel_4byte
+; CHECK-NEXT:    xorl %eax, %eax # encoding: [0x31,0xc0]
+; CHECK-NEXT:    retq # encoding: [0xc3]
+entry:
+  %shl.i = shl i64 1, 0
+  %0 = atomicrmw or ptr @a, i64 %shl.i monotonic, align 8
+  %and.i = and i64 %shl.i, %0
+  ret i32 0
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145933.505033.patch
Type: text/x-patch
Size: 956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230314/5d399471/attachment.bin>


More information about the llvm-commits mailing list