]> granicus.if.org Git - clang/commit
[PowerPC][Altivec][Clang] Check compile-time constant for vec_dst*
authorJinsong Ji <jji@us.ibm.com>
Wed, 4 Sep 2019 15:22:26 +0000 (15:22 +0000)
committerJinsong Ji <jji@us.ibm.com>
Wed, 4 Sep 2019 15:22:26 +0000 (15:22 +0000)
commit41f658a7984a3387477560d75dd915c7d1a9bd70
treee0f55bf1a64bf2ba464ba2d096e55f93dce4cdff
parentf521f90c4479af43412ed1125fd33a8f332083fe
[PowerPC][Altivec][Clang] Check compile-time constant for vec_dst*

Summary:
This is follow up of https://reviews.llvm.org/D66699.
We might get ISEL ICE if we call vec_dss with non const 3rd arg.

```
Cannot select: intrinsic %llvm.ppc.altivec.dst
```

We should check the constraints in clang and generate better error
messages.

Reviewers: nemanjai, hfinkel, echristo, #powerpc, wuzish

Reviewed By: #powerpc, wuzish

Subscribers: wuzish, kbarton, MaskRay, shchenz, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66748

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370912 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/BuiltinsPPC.def
lib/Sema/SemaChecking.cpp
test/CodeGen/builtins-ppc-error.c