Skip to content
Commit a2521389 authored by David Majnemer's avatar David Majnemer
Browse files

InstCombine: Don't miscompile (x lshr C1) udiv C2

We have a transform that changes:
  (x lshr C1) udiv C2
into:
  x udiv (C2 << C1)

However, it is unsafe to do so if C2 << C1 discards any of C2's bits.

This fixes PR21255.

llvm-svn: 219634
parent a562b46d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment