[llvm] 1c6b674 - LowerAtomic: Convert tests to opaque pointers
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 27 18:08:03 PST 2022
Author: Matt Arsenault
Date: 2022-11-27T20:53:57-05:00
New Revision: 1c6b674473aec642f93d198839cfc8ec556c3a6c
URL: https://github.com/llvm/llvm-project/commit/1c6b674473aec642f93d198839cfc8ec556c3a6c
DIFF: https://github.com/llvm/llvm-project/commit/1c6b674473aec642f93d198839cfc8ec556c3a6c.diff
LOG: LowerAtomic: Convert tests to opaque pointers
Added:
Modified:
llvm/test/Transforms/LowerAtomic/atomic-load.ll
llvm/test/Transforms/LowerAtomic/atomic-swap.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LowerAtomic/atomic-load.ll b/llvm/test/Transforms/LowerAtomic/atomic-load.ll
index c52206a3fca1d..4642a00769597 100644
--- a/llvm/test/Transforms/LowerAtomic/atomic-load.ll
+++ b/llvm/test/Transforms/LowerAtomic/atomic-load.ll
@@ -4,7 +4,7 @@
define i8 @add() {
; CHECK-LABEL: @add(
%i = alloca i8
- %j = atomicrmw add i8* %i, i8 42 monotonic
+ %j = atomicrmw add ptr %i, i8 42 monotonic
; CHECK: [[INST:%[a-z0-9]+]] = load
; CHECK-NEXT: add
; CHECK-NEXT: store
@@ -15,7 +15,7 @@ define i8 @add() {
define i8 @nand() {
; CHECK-LABEL: @nand(
%i = alloca i8
- %j = atomicrmw nand i8* %i, i8 42 monotonic
+ %j = atomicrmw nand ptr %i, i8 42 monotonic
; CHECK: [[INST:%[a-z0-9]+]] = load
; CHECK-NEXT: and
; CHECK-NEXT: xor
@@ -27,7 +27,7 @@ define i8 @nand() {
define i8 @min() {
; CHECK-LABEL: @min(
%i = alloca i8
- %j = atomicrmw min i8* %i, i8 42 monotonic
+ %j = atomicrmw min ptr %i, i8 42 monotonic
; CHECK: [[INST:%[a-z0-9]+]] = load
; CHECK-NEXT: icmp
; CHECK-NEXT: select
@@ -39,7 +39,7 @@ define i8 @min() {
define float @fadd() {
; CHECK-LABEL: @fadd(
%i = alloca float
- %j = atomicrmw fadd float* %i, float 42.0 monotonic
+ %j = atomicrmw fadd ptr %i, float 42.0 monotonic
; CHECK: [[INST:%[a-z0-9]+]] = load
; CHECK-NEXT: fadd
; CHECK-NEXT: store
@@ -50,7 +50,7 @@ define float @fadd() {
define float @fsub() {
; CHECK-LABEL: @fsub(
%i = alloca float
- %j = atomicrmw fsub float* %i, float 42.0 monotonic
+ %j = atomicrmw fsub ptr %i, float 42.0 monotonic
; CHECK: [[INST:%[a-z0-9]+]] = load
; CHECK-NEXT: fsub
; CHECK-NEXT: store
@@ -61,7 +61,7 @@ define float @fsub() {
define float @fmax() {
; CHECK-LABEL: @fmax(
%i = alloca float
- %j = atomicrmw fmax float* %i, float 42.0 monotonic
+ %j = atomicrmw fmax ptr %i, float 42.0 monotonic
; CHECK: [[INST:%[a-z0-9]+]] = load
; CHECK-NEXT: call float @llvm.maxnum.f32
; CHECK-NEXT: store
@@ -72,7 +72,7 @@ define float @fmax() {
define float @fmin() {
; CHECK-LABEL: @fmin(
%i = alloca float
- %j = atomicrmw fmin float* %i, float 42.0 monotonic
+ %j = atomicrmw fmin ptr %i, float 42.0 monotonic
; CHECK: [[INST:%[a-z0-9]+]] = load
; CHECK-NEXT: call float @llvm.minnum.f32
; CHECK-NEXT: store
diff --git a/llvm/test/Transforms/LowerAtomic/atomic-swap.ll b/llvm/test/Transforms/LowerAtomic/atomic-swap.ll
index c43cadbe30dc0..4e9f75a1c05a0 100644
--- a/llvm/test/Transforms/LowerAtomic/atomic-swap.ll
+++ b/llvm/test/Transforms/LowerAtomic/atomic-swap.ll
@@ -3,12 +3,12 @@
define i8 @cmpswap() {
; CHECK-LABEL: @cmpswap(
%i = alloca i8
- %pair = cmpxchg i8* %i, i8 0, i8 42 monotonic monotonic
+ %pair = cmpxchg ptr %i, i8 0, i8 42 monotonic monotonic
%j = extractvalue { i8, i1 } %pair, 0
-; CHECK: [[OLDVAL:%[a-z0-9]+]] = load i8, i8* [[ADDR:%[a-z0-9]+]]
+; CHECK: [[OLDVAL:%[a-z0-9]+]] = load i8, ptr [[ADDR:%[a-z0-9]+]]
; CHECK-NEXT: [[SAME:%[a-z0-9]+]] = icmp eq i8 [[OLDVAL]], 0
; CHECK-NEXT: [[TO_STORE:%[a-z0-9]+]] = select i1 [[SAME]], i8 42, i8 [[OLDVAL]]
-; CHECK-NEXT: store i8 [[TO_STORE]], i8* [[ADDR]]
+; CHECK-NEXT: store i8 [[TO_STORE]], ptr [[ADDR]]
; CHECK-NEXT: [[TMP:%[a-z0-9]+]] = insertvalue { i8, i1 } poison, i8 [[OLDVAL]], 0
; CHECK-NEXT: [[RES:%[a-z0-9]+]] = insertvalue { i8, i1 } [[TMP]], i1 [[SAME]], 1
; CHECK-NEXT: [[VAL:%[a-z0-9]+]] = extractvalue { i8, i1 } [[RES]], 0
@@ -20,7 +20,7 @@ define i8 @cmpswap() {
define i8 @swap() {
; CHECK-LABEL: @swap(
%i = alloca i8
- %j = atomicrmw xchg i8* %i, i8 42 monotonic
+ %j = atomicrmw xchg ptr %i, i8 42 monotonic
; CHECK: [[INST:%[a-z0-9]+]] = load
; CHECK-NEXT: store
ret i8 %j
@@ -31,7 +31,7 @@ define i8 @swap() {
define i8 @swap_optnone() noinline optnone {
; CHECK-LABEL: @swap_optnone(
%i = alloca i8
- %j = atomicrmw xchg i8* %i, i8 42 monotonic
+ %j = atomicrmw xchg ptr %i, i8 42 monotonic
; CHECK: [[INST:%[a-z0-9]+]] = load
; CHECK-NEXT: store
ret i8 %j
More information about the llvm-commits
mailing list