23 lines · cpp
1// RUN: %clang_cc1 -triple arm64-apple-ios -target-feature +neon -ffreestanding -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-UNSIGNED-POLY %s2// RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon -ffreestanding -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-UNSIGNED-POLY %s3// RUN: %clang_cc1 -triple armv7-apple-ios -ffreestanding -target-cpu cortex-a8 -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-SIGNED-POLY %s4 5// REQUIRES: aarch64-registered-target || arm-registered-target6 7#include <arm_neon.h>8 9// Polynomial types really should be universally unsigned, otherwise casting10// (say) poly8_t "x^7" to poly16_t would change it to "x^15 + x^14 + ... +11// x^7". Unfortunately 32-bit ARM ended up in a slightly delicate ABI situation12// so for now it got that wrong.13 14poly16_t test_poly8(poly8_t pIn) {15// CHECK-UNSIGNED-POLY: @_Z10test_poly8h16// CHECK-UNSIGNED-POLY: zext i8 {{.*}} to i1617 18// CHECK-SIGNED-POLY: @_Z10test_poly8a19// CHECK-SIGNED-POLY: sext i8 {{.*}} to i1620 21 return pIn;22}23