diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2019-02-01 14:37:49 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2019-02-01 14:37:49 +0000 |
| commit | fbcbac717436e1614ada754d57c76d789de2abfc (patch) | |
| tree | 7921781c18b27a69d8589b7c9510e398f3878054 /llvm/lib/Transforms | |
| parent | 4fb0a2c95993df34df8e44c0ad2188ecea8d9c81 (diff) | |
| download | bcm5719-llvm-fbcbac717436e1614ada754d57c76d789de2abfc.tar.gz bcm5719-llvm-fbcbac717436e1614ada754d57c76d789de2abfc.zip | |
[InstCombine] reduce duplicate code; NFC
An unused variable problem was introduced with rL352870
and stubbed out with rL352871, but we can make a better
fix by actually using the local variable in code rather
than just the assert.
llvm-svn: 352873
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp index caed651571a..811b0fd4f11 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -761,7 +761,6 @@ static Value *simplifyX86addcarry(const IntrinsicInst &II, assert(RetTy->getStructElementType(0)->isIntegerTy(8) && RetTy->getStructElementType(1) == OpTy && OpTy == Op2->getType() && "Unexpected types for x86 addcarry"); - (void)RetTy; // If carry-in is zero, this is just an unsigned add with overflow. if (match(CarryIn, m_ZeroInt())) { @@ -771,7 +770,7 @@ static Value *simplifyX86addcarry(const IntrinsicInst &II, Value *UAddResult = Builder.CreateExtractValue(UAdd, 0); Value *UAddOV = Builder.CreateZExt(Builder.CreateExtractValue(UAdd, 1), Builder.getInt8Ty()); - Value *Res = UndefValue::get(II.getType()); + Value *Res = UndefValue::get(RetTy); Res = Builder.CreateInsertValue(Res, UAddOV, 0); return Builder.CreateInsertValue(Res, UAddResult, 1); } |

