mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Move TargetData to DataLayout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -37,7 +37,7 @@ static Value *simplifyValueKnownNonZero(Value *V, InstCombiner &IC) {
|
||||
if (match(V, m_LShr(m_OneUse(m_Shl(m_Value(PowerOf2), m_Value(A))),
|
||||
m_Value(B))) &&
|
||||
// The "1" can be any value known to be a power of 2.
|
||||
isPowerOfTwo(PowerOf2, IC.getTargetData())) {
|
||||
isPowerOfTwo(PowerOf2, IC.getDataLayout())) {
|
||||
A = IC.Builder->CreateSub(A, B);
|
||||
return IC.Builder->CreateShl(PowerOf2, A);
|
||||
}
|
||||
@@ -46,7 +46,7 @@ static Value *simplifyValueKnownNonZero(Value *V, InstCombiner &IC) {
|
||||
// inexact. Similarly for <<.
|
||||
if (BinaryOperator *I = dyn_cast<BinaryOperator>(V))
|
||||
if (I->isLogicalShift() &&
|
||||
isPowerOfTwo(I->getOperand(0), IC.getTargetData())) {
|
||||
isPowerOfTwo(I->getOperand(0), IC.getDataLayout())) {
|
||||
// We know that this is an exact/nuw shift and that the input is a
|
||||
// non-zero context as well.
|
||||
if (Value *V2 = simplifyValueKnownNonZero(I->getOperand(0), IC)) {
|
||||
|
||||
Reference in New Issue
Block a user