Skip to content
Commit 86b4a235 authored by Sanjay Patel's avatar Sanjay Patel
Browse files

[InstCombine] fold flooring sdiv by power-of-2 to ashr

It's a bigger match than usual, but I have not found any
sub-patterns that reduce:
(X / DivC) + sext ((X & (SMin | (DivC - 1)) >u SMin) --> X >>s log2(DivC)

https://alive2.llvm.org/ce/z/MJzlhl

Fixes issue #55741
parent 3c7d059f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment