Add avg_{up,down}_int{8,16} routines to stdlib
These compute the average of two given values, rounding up and down, respectively, if the result isn't exact. When possible, these are mapped to target-specific intrinsics (PADD[BW] on IA and VH[R]ADD[US] on NEON.) A subsequent commit will add pattern-matching to generate calls to these intrinsincs when the corresponding patterns are detected in the IR.)
This commit is contained in:
8
opt.cpp
8
opt.cpp
@@ -4343,6 +4343,14 @@ char MakeInternalFuncsStaticPass::ID = 0;
|
||||
bool
|
||||
MakeInternalFuncsStaticPass::runOnModule(llvm::Module &module) {
|
||||
const char *names[] = {
|
||||
"__avg_up_uint8",
|
||||
"__avg_up_int8",
|
||||
"__avg_up_uint16",
|
||||
"__avg_up_int16",
|
||||
"__avg_down_uint8",
|
||||
"__avg_down_int8",
|
||||
"__avg_down_uint16",
|
||||
"__avg_down_int16",
|
||||
"__fast_masked_vload",
|
||||
"__gather_factored_base_offsets32_i8", "__gather_factored_base_offsets32_i16",
|
||||
"__gather_factored_base_offsets32_i32", "__gather_factored_base_offsets32_i64",
|
||||
|
||||
Reference in New Issue
Block a user