mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-15 19:24:33 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219634 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -945,7 +945,8 @@ public:
|
||||
APInt sdiv_ov(const APInt &RHS, bool &Overflow) const;
|
||||
APInt smul_ov(const APInt &RHS, bool &Overflow) const;
|
||||
APInt umul_ov(const APInt &RHS, bool &Overflow) const;
|
||||
APInt sshl_ov(unsigned Amt, bool &Overflow) const;
|
||||
APInt sshl_ov(const APInt &Amt, bool &Overflow) const;
|
||||
APInt ushl_ov(const APInt &Amt, bool &Overflow) const;
|
||||
|
||||
/// \brief Array-indexing support.
|
||||
///
|
||||
|
Reference in New Issue
Block a user