Change triangle full block to use vectored load and store

This commit is contained in:
Magnus Norddahl 2016-11-20 01:29:19 +01:00
commit 845bf93c95
5 changed files with 152 additions and 104 deletions

View file

@ -23,6 +23,7 @@
#include "r_compiler/llvm_include.h"
#include "ssa_bool.h"
#include "ssa_ubyte.h"
#include "ssa_vec4i.h"
#include "ssa_value.h"
#include "ssa_scope.h"
@ -61,6 +62,11 @@ SSAUByte SSABool::select(SSAUByte a, SSAUByte b)
return SSAValue::from_llvm(SSAScope::builder().CreateSelect(v, a.v, b.v, SSAScope::hint()));
}
SSAVec4i SSABool::select(SSAVec4i a, SSAVec4i b)
{
return SSAValue::from_llvm(SSAScope::builder().CreateSelect(v, a.v, b.v, SSAScope::hint()));
}
SSABool operator&&(const SSABool &a, const SSABool &b)
{
return SSABool::from_llvm(SSAScope::builder().CreateAnd(a.v, b.v, SSAScope::hint()));