[InstCombine] fold full-shift of sdiv to icmp+extend
This is a disguised sign-bit test with offset: (X / +DivC) >> (Width - 1) --> ext (X <= -DivC) (X / -DivC) >> (Width - 1) --> ext (X >= +DivC) https://alive2.llvm.org/ce/z/cO8JO4 We don't match/test poison in the sdiv constant because that would be immediate undefined behavior.
Loading
Please sign in to comment