git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200210
91177308-0d34-0410-b5e6-
96231b3b80d8
Operands.append(Mul->op_begin() + 1, Mul->op_end());
LHS = getMulExpr(Operands);
RHS = RHSCst;
- Mul = cast<SCEVMulExpr>(LHS);
+ Mul = dyn_cast<SCEVMulExpr>(LHS);
+ if (!Mul)
+ return getUDivExactExpr(LHS, RHS);
}
}
}
; CHECK: --> (-2147483648 * (%i /u -2147483648))
ret void
}
+
+define void @test6(i8 %x) {
+; CHECK-LABEL: @test6
+ %A = zext i8 %x to i16
+ %B = shl nuw i16 %A, 8
+ %C = and i16 %B, -2048
+; CHECK: --> (2048 * ((zext i8 %x to i16) /u 8))
+ ret void
+}