diff options
author | Fangrui Song <maskray@google.com> | 2019-04-08 07:29:24 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-04-08 07:29:24 +0000 |
commit | dc1f4a6764e735fbfc25e49ce2bdfd2f78ae4e57 (patch) | |
tree | a7f46c891bcc2c57d0bba72f344a2d78d952bac8 /llvm/lib/IR/ConstantRange.cpp | |
parent | 4af8d47d059058667921fa788949f3b54f9af2ee (diff) | |
download | bcm5719-llvm-dc1f4a6764e735fbfc25e49ce2bdfd2f78ae4e57.tar.gz bcm5719-llvm-dc1f4a6764e735fbfc25e49ce2bdfd2f78ae4e57.zip |
[ConstantRange] Delete redundnt {z,s}extOrSelf for multiplication
These calls are redundant because the quotients have the same BitWidth
as MinValue/MaxValue.
llvm-svn: 357886
Diffstat (limited to 'llvm/lib/IR/ConstantRange.cpp')
-rw-r--r-- | llvm/lib/IR/ConstantRange.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp index f48fe9f737d..391d9653db5 100644 --- a/llvm/lib/IR/ConstantRange.cpp +++ b/llvm/lib/IR/ConstantRange.cpp @@ -314,13 +314,6 @@ ConstantRange::makeGuaranteedNoWrapRegion(Instruction::BinaryOps BinOp, Lower = APIntOps::RoundingSDiv(MinValue, V, APInt::Rounding::UP); Upper = APIntOps::RoundingSDiv(MaxValue, V, APInt::Rounding::DOWN); } - if (Unsigned) { - Lower = Lower.zextOrSelf(BitWidth); - Upper = Upper.zextOrSelf(BitWidth); - } else { - Lower = Lower.sextOrSelf(BitWidth); - Upper = Upper.sextOrSelf(BitWidth); - } // ConstantRange ctor take a half inclusive interval [Lower, Upper + 1). // Upper + 1 is guanranteed not to overflow, because |divisor| > 1. 0, -1, // and 1 are already handled as special cases. |