From: Zack Rusin Date: Wed, 13 Feb 2008 09:37:40 +0000 (-0500) Subject: implement add X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e179d5bdd199e3747773f5b07efcf9a635c41089;p=mesa.git implement add --- diff --git a/src/mesa/pipe/llvm/instructionssoa.cpp b/src/mesa/pipe/llvm/instructionssoa.cpp index f1c174a26e5..0c2032e56ff 100644 --- a/src/mesa/pipe/llvm/instructionssoa.cpp +++ b/src/mesa/pipe/llvm/instructionssoa.cpp @@ -12,6 +12,11 @@ std::vector InstructionsSoa::add(const std::vector i { std::vector 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 InstructionsSoa::mul(const std::vector i { std::vector 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; }