CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
313 lines
17 KiB
C
313 lines
17 KiB
C
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 6
|
|
// RUN: %clang_cc1 -O3 -triple powerpc64le-unknown-unknown -target-cpu pwr9 \
|
|
// RUN: -emit-llvm %s -o - | FileCheck %s
|
|
// RUN: %clang_cc1 -O3 -triple powerpc64-ibm-aix -target-cpu pwr9 \
|
|
// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=AIX
|
|
|
|
// CHECK-LABEL: define dso_local void @test_unsigned_lwat(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], i32 noundef zeroext [[VALUE:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.ppc.amo.lwat(ptr [[PTR]], i32 [[VALUE]], i32 0)
|
|
// CHECK-NEXT: store i32 [[TMP0]], ptr [[RESP]], align 4, !tbaa [[INT_TBAA2:![0-9]+]]
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_unsigned_lwat(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], i32 noundef zeroext [[VALUE:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.ppc.amo.lwat(ptr [[PTR]], i32 [[VALUE]], i32 0)
|
|
// AIX-NEXT: store i32 [[TMP0]], ptr [[RESP]], align 4, !tbaa [[INT_TBAA2:![0-9]+]]
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_unsigned_lwat(unsigned int *ptr, unsigned int value, unsigned int * resp) {
|
|
unsigned int res = __builtin_amo_lwat(ptr, value, 0);
|
|
*resp = res;
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_unsigned_ldat(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], i64 noundef [[VALUE:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.ppc.amo.ldat(ptr [[PTR]], i64 [[VALUE]], i32 3)
|
|
// CHECK-NEXT: store i64 [[TMP0]], ptr [[RESP]], align 8, !tbaa [[LONG_TBAA6:![0-9]+]]
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_unsigned_ldat(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], i64 noundef [[VALUE:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.ppc.amo.ldat(ptr [[PTR]], i64 [[VALUE]], i32 3)
|
|
// AIX-NEXT: store i64 [[TMP0]], ptr [[RESP]], align 8, !tbaa [[LONG_TBAA6:![0-9]+]]
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_unsigned_ldat(unsigned long int *ptr, unsigned long int value, unsigned long int * resp) {
|
|
unsigned long int res = __builtin_amo_ldat(ptr, value, 3);
|
|
*resp = res;
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_signed_lwat(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], i32 noundef signext [[VALUE:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.ppc.amo.lwat(ptr [[PTR]], i32 [[VALUE]], i32 5)
|
|
// CHECK-NEXT: store i32 [[TMP0]], ptr [[RESP]], align 4, !tbaa [[INT_TBAA2]]
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_signed_lwat(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], i32 noundef signext [[VALUE:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.ppc.amo.lwat(ptr [[PTR]], i32 [[VALUE]], i32 5)
|
|
// AIX-NEXT: store i32 [[TMP0]], ptr [[RESP]], align 4, !tbaa [[INT_TBAA2]]
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_signed_lwat(int *ptr, int value, int * resp) {
|
|
int res = __builtin_amo_lwat_s(ptr, value, 5);
|
|
*resp = res;
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_signed_ldat(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], i64 noundef [[VALUE:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.ppc.amo.ldat(ptr [[PTR]], i64 [[VALUE]], i32 8)
|
|
// CHECK-NEXT: store i64 [[TMP0]], ptr [[RESP]], align 8, !tbaa [[LONG_TBAA6]]
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_signed_ldat(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], i64 noundef [[VALUE:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.ppc.amo.ldat(ptr [[PTR]], i64 [[VALUE]], i32 8)
|
|
// AIX-NEXT: store i64 [[TMP0]], ptr [[RESP]], align 8, !tbaa [[LONG_TBAA6]]
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_signed_ldat(long int *ptr, long int value, long int * resp) {
|
|
long int res = __builtin_amo_ldat_s(ptr, value, 8);
|
|
*resp = res;
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_unsigned_lwat_cond(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.ppc.amo.lwat.cond(ptr [[PTR]], i32 24)
|
|
// CHECK-NEXT: store i32 [[TMP0]], ptr [[RESP]], align 4, !tbaa [[INT_TBAA2]]
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_unsigned_lwat_cond(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.ppc.amo.lwat.cond(ptr [[PTR]], i32 24)
|
|
// AIX-NEXT: store i32 [[TMP0]], ptr [[RESP]], align 4, !tbaa [[INT_TBAA2]]
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_unsigned_lwat_cond(unsigned int *ptr, unsigned int * resp) {
|
|
unsigned int res = __builtin_amo_lwat_cond(ptr, 24);
|
|
*resp = res;
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_unsigned_ldat_cond(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.ppc.amo.ldat.cond(ptr [[PTR]], i32 25)
|
|
// CHECK-NEXT: store i64 [[TMP0]], ptr [[RESP]], align 8, !tbaa [[LONG_TBAA6]]
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_unsigned_ldat_cond(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.ppc.amo.ldat.cond(ptr [[PTR]], i32 25)
|
|
// AIX-NEXT: store i64 [[TMP0]], ptr [[RESP]], align 8, !tbaa [[LONG_TBAA6]]
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_unsigned_ldat_cond(unsigned long int *ptr, unsigned long int * resp) {
|
|
unsigned long int res = __builtin_amo_ldat_cond(ptr, 25);
|
|
*resp = res;
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_signed_lwat_cond(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.ppc.amo.lwat.cond(ptr [[PTR]], i32 24)
|
|
// CHECK-NEXT: store i32 [[TMP0]], ptr [[RESP]], align 4, !tbaa [[INT_TBAA2]]
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_signed_lwat_cond(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.ppc.amo.lwat.cond(ptr [[PTR]], i32 24)
|
|
// AIX-NEXT: store i32 [[TMP0]], ptr [[RESP]], align 4, !tbaa [[INT_TBAA2]]
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_signed_lwat_cond(int *ptr, int * resp) {
|
|
int res = __builtin_amo_lwat_cond_s(ptr, 24);
|
|
*resp = res;
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_signed_ldat_cond(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.ppc.amo.ldat.cond(ptr [[PTR]], i32 25)
|
|
// CHECK-NEXT: store i64 [[TMP0]], ptr [[RESP]], align 8, !tbaa [[LONG_TBAA6]]
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_signed_ldat_cond(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.ppc.amo.ldat.cond(ptr [[PTR]], i32 25)
|
|
// AIX-NEXT: store i64 [[TMP0]], ptr [[RESP]], align 8, !tbaa [[LONG_TBAA6]]
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_signed_ldat_cond(long int *ptr, long int * resp) {
|
|
long int res = __builtin_amo_ldat_cond_s(ptr, 25);
|
|
*resp = res;
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_unsigned_stwat(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], i32 noundef zeroext [[VALUE:%.*]], ptr noundef readnone captures(none) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: tail call void @llvm.ppc.amo.stwat(ptr [[PTR]], i32 [[VALUE]], i32 24)
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_unsigned_stwat(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], i32 noundef zeroext [[VALUE:%.*]], ptr noundef readnone captures(none) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: tail call void @llvm.ppc.amo.stwat(ptr [[PTR]], i32 [[VALUE]], i32 24)
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_unsigned_stwat(unsigned int *ptr, unsigned int value, unsigned int * resp) {
|
|
__builtin_amo_stwat(ptr, value, 24);
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_unsigned_stdat(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], i64 noundef [[VALUE:%.*]], ptr noundef readnone captures(none) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: tail call void @llvm.ppc.amo.stdat(ptr [[PTR]], i64 [[VALUE]], i32 3)
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_unsigned_stdat(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], i64 noundef [[VALUE:%.*]], ptr noundef readnone captures(none) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: tail call void @llvm.ppc.amo.stdat(ptr [[PTR]], i64 [[VALUE]], i32 3)
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_unsigned_stdat(unsigned long int *ptr, unsigned long int value, unsigned long int * resp) {
|
|
__builtin_amo_stdat(ptr, value, 3);
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_signed_stwat(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], i32 noundef signext [[VALUE:%.*]], ptr noundef readnone captures(none) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: tail call void @llvm.ppc.amo.stwat(ptr [[PTR]], i32 [[VALUE]], i32 24)
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_signed_stwat(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], i32 noundef signext [[VALUE:%.*]], ptr noundef readnone captures(none) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: tail call void @llvm.ppc.amo.stwat(ptr [[PTR]], i32 [[VALUE]], i32 24)
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_signed_stwat(int *ptr, int value, int * resp) {
|
|
__builtin_amo_stwat_s(ptr, value, 24);
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_signed_stdat(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], i64 noundef [[VALUE:%.*]], ptr noundef readnone captures(none) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: tail call void @llvm.ppc.amo.stdat(ptr [[PTR]], i64 [[VALUE]], i32 5)
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_signed_stdat(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], i64 noundef [[VALUE:%.*]], ptr noundef readnone captures(none) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: tail call void @llvm.ppc.amo.stdat(ptr [[PTR]], i64 [[VALUE]], i32 5)
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_signed_stdat(long int *ptr, long int value, long int * resp) {
|
|
__builtin_amo_stdat_s(ptr, value, 5);
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_unsigned_lwat_csne(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], i32 noundef zeroext [[VAL1:%.*]], i32 noundef zeroext [[VAL2:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.ppc.amo.lwat.csne(ptr [[PTR]], i32 [[VAL1]], i32 [[VAL2]])
|
|
// CHECK-NEXT: store i32 [[TMP0]], ptr [[RESP]], align 4, !tbaa [[INT_TBAA2]]
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_unsigned_lwat_csne(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], i32 noundef zeroext [[VAL1:%.*]], i32 noundef zeroext [[VAL2:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.ppc.amo.lwat.csne(ptr [[PTR]], i32 [[VAL1]], i32 [[VAL2]])
|
|
// AIX-NEXT: store i32 [[TMP0]], ptr [[RESP]], align 4, !tbaa [[INT_TBAA2]]
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_unsigned_lwat_csne(unsigned int *ptr, unsigned int val1, unsigned int val2, unsigned int * resp) {
|
|
unsigned int res = __builtin_amo_lwat_csne(ptr, val1, val2);
|
|
*resp = res;
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_unsigned_ldat_csne(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], i64 noundef [[VAL1:%.*]], i64 noundef [[VAL2:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.ppc.amo.ldat.csne(ptr [[PTR]], i64 [[VAL1]], i64 [[VAL2]])
|
|
// CHECK-NEXT: store i64 [[TMP0]], ptr [[RESP]], align 8, !tbaa [[LONG_TBAA6]]
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_unsigned_ldat_csne(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], i64 noundef [[VAL1:%.*]], i64 noundef [[VAL2:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.ppc.amo.ldat.csne(ptr [[PTR]], i64 [[VAL1]], i64 [[VAL2]])
|
|
// AIX-NEXT: store i64 [[TMP0]], ptr [[RESP]], align 8, !tbaa [[LONG_TBAA6]]
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_unsigned_ldat_csne(unsigned long int *ptr, unsigned long int val1, unsigned long int val2, unsigned long int * resp) {
|
|
unsigned long int res = __builtin_amo_ldat_csne(ptr, val1, val2);
|
|
*resp = res;
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_unsigned_lwat_csne_s(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], i32 noundef signext [[VAL1:%.*]], i32 noundef signext [[VAL2:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.ppc.amo.lwat.csne(ptr [[PTR]], i32 [[VAL1]], i32 [[VAL2]])
|
|
// CHECK-NEXT: store i32 [[TMP0]], ptr [[RESP]], align 4, !tbaa [[INT_TBAA2]]
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_unsigned_lwat_csne_s(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], i32 noundef signext [[VAL1:%.*]], i32 noundef signext [[VAL2:%.*]], ptr noundef writeonly captures(none) initializes((0, 4)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: [[TMP0:%.*]] = tail call i32 @llvm.ppc.amo.lwat.csne(ptr [[PTR]], i32 [[VAL1]], i32 [[VAL2]])
|
|
// AIX-NEXT: store i32 [[TMP0]], ptr [[RESP]], align 4, !tbaa [[INT_TBAA2]]
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_unsigned_lwat_csne_s(signed int *ptr, signed int val1, signed int val2, signed int * resp) {
|
|
signed int res = __builtin_amo_lwat_csne_s(ptr, val1, val2);
|
|
*resp = res;
|
|
}
|
|
|
|
// CHECK-LABEL: define dso_local void @test_unsigned_ldat_csne_s(
|
|
// CHECK-SAME: ptr noundef [[PTR:%.*]], i64 noundef [[VAL1:%.*]], i64 noundef [[VAL2:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// CHECK-NEXT: [[ENTRY:.*:]]
|
|
// CHECK-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.ppc.amo.ldat.csne(ptr [[PTR]], i64 [[VAL1]], i64 [[VAL2]])
|
|
// CHECK-NEXT: store i64 [[TMP0]], ptr [[RESP]], align 8, !tbaa [[LONG_TBAA6]]
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
// AIX-LABEL: define void @test_unsigned_ldat_csne_s(
|
|
// AIX-SAME: ptr noundef [[PTR:%.*]], i64 noundef [[VAL1:%.*]], i64 noundef [[VAL2:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[RESP:%.*]]) local_unnamed_addr #[[ATTR0]] {
|
|
// AIX-NEXT: [[ENTRY:.*:]]
|
|
// AIX-NEXT: [[TMP0:%.*]] = tail call i64 @llvm.ppc.amo.ldat.csne(ptr [[PTR]], i64 [[VAL1]], i64 [[VAL2]])
|
|
// AIX-NEXT: store i64 [[TMP0]], ptr [[RESP]], align 8, !tbaa [[LONG_TBAA6]]
|
|
// AIX-NEXT: ret void
|
|
//
|
|
void test_unsigned_ldat_csne_s(signed long int *ptr, signed long int val1, signed long int val2, signed long int * resp) {
|
|
signed long int res = __builtin_amo_ldat_csne_s(ptr, val1, val2);
|
|
*resp = res;
|
|
}
|
|
//.
|
|
// CHECK: [[INT_TBAA2]] = !{[[META3:![0-9]+]], [[META3]], i64 0}
|
|
// CHECK: [[META3]] = !{!"int", [[META4:![0-9]+]], i64 0}
|
|
// CHECK: [[META4]] = !{!"omnipotent char", [[META5:![0-9]+]], i64 0}
|
|
// CHECK: [[META5]] = !{!"Simple C/C++ TBAA"}
|
|
// CHECK: [[LONG_TBAA6]] = !{[[META7:![0-9]+]], [[META7]], i64 0}
|
|
// CHECK: [[META7]] = !{!"long", [[META4]], i64 0}
|
|
//.
|
|
// AIX: [[INT_TBAA2]] = !{[[META3:![0-9]+]], [[META3]], i64 0}
|
|
// AIX: [[META3]] = !{!"int", [[META4:![0-9]+]], i64 0}
|
|
// AIX: [[META4]] = !{!"omnipotent char", [[META5:![0-9]+]], i64 0}
|
|
// AIX: [[META5]] = !{!"Simple C/C++ TBAA"}
|
|
// AIX: [[LONG_TBAA6]] = !{[[META7:![0-9]+]], [[META7]], i64 0}
|
|
// AIX: [[META7]] = !{!"long", [[META4]], i64 0}
|
|
//.
|