mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-31 01:03:35 +00:00
Add optimization edge case for square mat * mat
This commit is contained in:
@@ -2048,6 +2048,15 @@ gb_internal LLVMValueRef llvm_mask_zero(lbModule *m, unsigned count) {
|
||||
return LLVMConstNull(LLVMVectorType(lb_type(m, t_u32), count));
|
||||
}
|
||||
|
||||
gb_internal LLVMValueRef llvm_mask_same(lbModule *m, unsigned value, unsigned count) {
|
||||
auto iota = slice_make<LLVMValueRef>(temporary_allocator(), count);
|
||||
for (unsigned i = 0; i < count; i++) {
|
||||
iota[i] = lb_const_int(m, t_u32, value).value;
|
||||
}
|
||||
return LLVMConstVector(iota.data, count);
|
||||
}
|
||||
|
||||
|
||||
#define LLVM_VECTOR_DUMMY_VALUE(type) LLVMGetUndef((type))
|
||||
// #define LLVM_VECTOR_DUMMY_VALUE(type) LLVMConstNull((type))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user