aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/llvm/instructions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/llvm/instructions.cpp')
-rw-r--r--src/mesa/pipe/llvm/instructions.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/pipe/llvm/instructions.cpp b/src/mesa/pipe/llvm/instructions.cpp
index ee67ae0eeda..1e6b74eac62 100644
--- a/src/mesa/pipe/llvm/instructions.cpp
+++ b/src/mesa/pipe/llvm/instructions.cpp
@@ -302,3 +302,12 @@ llvm::Value * Instructions::dst(llvm::Value *in1, llvm::Value *in2)
ry, z, w);
}
+llvm::Value * Instructions::ex2(llvm::Value *in)
+{
+ llvm::Value *val = callPow(ConstantFP::get(Type::FloatTy, APFloat(2.f)),
+ new ExtractElementInst(in, unsigned(0),
+ name("x1"),
+ m_block));
+ return vectorFromVals(val, val, val, val);
+}
+