summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/llvm
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2008-02-13 04:37:40 -0500
committerZack Rusin <zack@tungstengraphics.com>2008-02-13 04:37:40 -0500
commite179d5bdd199e3747773f5b07efcf9a635c41089 (patch)
tree5fb2e73961c3290854fb2374bfd11db3f552b194 /src/mesa/pipe/llvm
parent135d2329de7721b2083aa5f38f8d66beb20c1181 (diff)
implement add
Diffstat (limited to 'src/mesa/pipe/llvm')
-rw-r--r--src/mesa/pipe/llvm/instructionssoa.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/pipe/llvm/instructionssoa.cpp b/src/mesa/pipe/llvm/instructionssoa.cpp
index f1c174a26e..0c2032e56f 100644
--- a/src/mesa/pipe/llvm/instructionssoa.cpp
+++ b/src/mesa/pipe/llvm/instructionssoa.cpp
@@ -12,6 +12,11 @@ std::vector<llvm::Value*> InstructionsSoa::add(const std::vector<llvm::Value*> i
{
std::vector<llvm::Value*> res(4);
+ res[0] = m_builder.CreateAdd(in1[0], in2[0], name("addx"));
+ res[1] = m_builder.CreateAdd(in1[1], in2[1], name("addy"));
+ res[2] = m_builder.CreateAdd(in1[2], in2[2], name("addz"));
+ res[3] = m_builder.CreateAdd(in1[3], in2[3], name("addw"));
+
return res;
}
@@ -20,10 +25,10 @@ std::vector<llvm::Value*> InstructionsSoa::mul(const std::vector<llvm::Value*> i
{
std::vector<llvm::Value*> res(4);
- res[0] = m_builder.CreateMul(in1[0], in2[0], name("mul"));
- res[1] = m_builder.CreateMul(in1[1], in2[1], name("mul"));
- res[2] = m_builder.CreateMul(in1[2], in2[2], name("mul"));
- res[3] = m_builder.CreateMul(in1[3], in2[3], name("mul"));
+ res[0] = m_builder.CreateMul(in1[0], in2[0], name("mulx"));
+ res[1] = m_builder.CreateMul(in1[1], in2[1], name("muly"));
+ res[2] = m_builder.CreateMul(in1[2], in2[2], name("mulz"));
+ res[3] = m_builder.CreateMul(in1[3], in2[3], name("mulw"));
return res;
}