
Summary: This is similar to vec_ct* in https://reviews.llvm.org/rL304205. The argument must be a constant, otherwise instruction selection will fail. always_inline is not enough for isel to always fold everything away at -O0. The fix is to turn the function into macros in altivec.h. Fixes https://bugs.llvm.org/show_bug.cgi?id=43072 Reviewers: nemanjai, hfinkel, #powerpc, wuzish Reviewed By: #powerpc, wuzish Subscribers: wuzish, kbarton, MaskRay, shchenz, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66699 llvm-svn: 370902
12 lines
231 B
C
12 lines
231 B
C
// RUN: %clang_cc1 -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);
|
|
}
|