brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · d6fbaf3 Raw
24 lines · c
1// REQUIRES: powerpc-registered-target2// RUN: not %clang_cc1 -triple=powerpc-unknown-aix -emit-llvm %s -o - 2>&1 |\3// RUN: FileCheck %s --check-prefix=CHECK32-ERROR4// RUN: %clang_cc1 -O2 -triple=powerpc64-unknown-aix -emit-llvm %s -o - | \5// RUN: FileCheck %s --check-prefix=CHECK646// RUN: %clang_cc1 -O2 -triple=powerpc64le-unknown-linux-gnu -emit-llvm %s \7// RUN:  -o - | FileCheck %s --check-prefix=CHECK648// RUN: %clang_cc1 -O2 -triple=powerpc64-unknown-linux-gnu -emit-llvm %s \9// RUN:  -o - | FileCheck %s --check-prefix=CHECK6410 11long test_ldarx(volatile long* a) {12  // CHECK64-LABEL: @test_ldarx13  // CHECK64: %0 = tail call i64 asm sideeffect "ldarx $0, ${1:y}", "=r,*Z,~{memory}"(ptr elementtype(i64) %a)14  // CHECK32-ERROR: error: this builtin is only available on 64-bit targets15  return __ldarx(a);16}17 18int test_stdcx(volatile long* addr, long val) {19  // CHECK64-LABEL: @test_stdcx20  // CHECK64: %0 = tail call i32 @llvm.ppc.stdcx(ptr %addr, i64 %val)21  // CHECK32-ERROR: error: this builtin is only available on 64-bit targets22  return __stdcx(addr, val);23}24