llvm-project
5654ecd5 - [DAGCombiner] Fix exact power-of-two signed division for large integers (#177340)

Commit
89 days ago
[DAGCombiner] Fix exact power-of-two signed division for large integers (#177340) Previously, the DAG combiner did not optimize exact signed division by a power-of-two constant divisor for integer types exceeding the size of division supported by the target architecture (e.g., i128 on x86-64). However, such an optimization was expected by the division expansion logic, leading to unsupported division operations making it to instruction selection. This commit addresses this issue by making an exception to the existing exclusion of signed division with the exact flag for the aforementioned operations. That is, the DAG combiner will now optimize exact signed division if the divisor is a power-of-two constant and the integer type exceeds the size of division supported by the target architecture. --------- Signed-off-by: Steffen Holst Larsen <HolstLarsen.Steffen@amd.com>
Author
Parents
Loading