
XL considers different vector types to be incompatible with each other. For example assignment between variables of types vector float and vector long long or even vector signed int and vector unsigned int are diagnosed. clang, however does not diagnose such cases and does a simple bitcast between the two types. This could easily result in program errors. This patch is to fix the implicit casts in altivec.h so that there is no incompatible vector type errors whit -fno-lax-vector-conversions, this is the prerequisite patch to switch the default to -fno-lax-vector-conversions later. Reviewed By: nemanjai, amyk Differential Revision: https://reviews.llvm.org/D124093
12 lines
261 B
C
12 lines
261 B
C
// RUN: %clang_cc1 -flax-vector-conversions=none -triple powerpc-linux-gnu -S -O0 -o - %s -target-feature +altivec | FileCheck %s
|
|
|
|
// REQUIRES: powerpc-registered-target
|
|
|
|
#include <altivec.h>
|
|
|
|
// CHECK-LABEL: test1
|
|
// CHECK: dss
|
|
void test1() {
|
|
vec_dss(1);
|
|
}
|