[InstCombine] Preserve NSW flags for `lshr (mul nuw X, C1), C2 -> mul nuw nsw X,...
[llvm-project.git] / clang / test / CodeGenCXX / poly-unsigned.cpp
blob31970e495777ddf8297e5c2b45d314eafb3e97ff
1 // RUN: %clang_cc1 -triple arm64-apple-ios -target-feature +neon -ffreestanding -S -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-UNSIGNED-POLY %s
2 // RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon -ffreestanding -S -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-UNSIGNED-POLY %s
3 // RUN: %clang_cc1 -triple armv7-apple-ios -ffreestanding -target-cpu cortex-a8 -S -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-SIGNED-POLY %s
5 // REQUIRES: aarch64-registered-target || arm-registered-target
7 #include <arm_neon.h>
9 // Polynomial types really should be universally unsigned, otherwise casting
10 // (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 situation
12 // so for now it got that wrong.
14 poly16_t test_poly8(poly8_t pIn) {
15 // CHECK-UNSIGNED-POLY: @_Z10test_poly8h
16 // CHECK-UNSIGNED-POLY: zext i8 {{.*}} to i16
18 // CHECK-SIGNED-POLY: @_Z10test_poly8a
19 // CHECK-SIGNED-POLY: sext i8 {{.*}} to i16
21 return pIn;