summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2008-05-09 06:41:27 +0000
committerNate Begeman <natebegeman@mac.com>2008-05-09 06:41:27 +0000
commitf322eabbce14ca5c96a022d5ab2a2d8837cbccd9 (patch)
treebdd0a06e7473ee920f7d505648e2badfc91f8491 /clang/lib/CodeGen/CodeGenFunction.h
parentba7a6c14edf259e306c3ecbf0b9fa7b024bf2534 (diff)
downloadbcm5719-llvm-f322eabbce14ca5c96a022d5ab2a2d8837cbccd9.tar.gz
bcm5719-llvm-f322eabbce14ca5c96a022d5ab2a2d8837cbccd9.zip
Extend vector member references to include {.hi, .lo, .e, .o} which return a
vector of the same element type and half the width, with the high, low, even, and odd elements respectively. Allow member references to member references, so that .hi.hi gives you the high quarter of a vector. This is fairly convenient syntax for some insert/extract operations. Remove some unnecessary methods/types in the ExtVectorElementExpr class. llvm-svn: 50892
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index a6caa379cc9..f067a0e2250 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -161,8 +161,12 @@ class LValue {
llvm::Value *V;
union {
- llvm::Value *VectorIdx; // Index into a vector subscript: V[i]
- unsigned VectorElts; // Encoded ExtVector element subset: V.xyx
+ // Index into a vector subscript: V[i]
+ llvm::Value *VectorIdx;
+
+ // ExtVector element subset: V.xyx
+ llvm::Constant *VectorElts;
+
struct {
unsigned short StartBit;
unsigned short Size;
@@ -182,7 +186,7 @@ public:
llvm::Value *getVectorIdx() const { assert(isVectorElt()); return VectorIdx; }
// extended vector elements.
llvm::Value *getExtVectorAddr() const { assert(isExtVectorElt()); return V; }
- unsigned getExtVectorElts() const {
+ llvm::Constant *getExtVectorElts() const {
assert(isExtVectorElt());
return VectorElts;
}
@@ -216,11 +220,11 @@ public:
return R;
}
- static LValue MakeExtVectorElt(llvm::Value *Vec, unsigned Elements) {
+ static LValue MakeExtVectorElt(llvm::Value *Vec, llvm::Constant *Elts) {
LValue R;
R.LVType = ExtVectorElt;
R.V = Vec;
- R.VectorElts = Elements;
+ R.VectorElts = Elts;
return R;
}
OpenPOWER on IntegriCloud