AArch64: update costing for combining vector conditionals
boolean comparisons have different cost depending on the mode. e.g. for SVE, a && b doesn't require an additional instruction when a or b is predicated by combining the predicate of the one operation into the second one. At the moment though we only fuse compares so this update requires one of the operands to be a comparison. Scalars also don't require this because the non-ifcvt variant is a series of branches where following the branch sequences themselves are natural ANDs. Advanced SIMD however does require an actual AND to combine the boolean values. As such this patch discounts Scalar and SVE boolean operation latency and throughput. With this patch comparison heavy code prefers SVE as it should, especially in cases with SVE VL == Advanced SIMD VL where previously the SVE prologue costs would tip it towards Advanced SIMD. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_bool_compound_p): New. (aarch64_adjust_stmt_cost, aarch64_vector_costs::count_ops): Use it.
Loading
Please register or sign in to comment