[PATCH] [InstCombine] Remove Duplicate Code in InstCombineShift
suyog
suyog.sarda at samsung.com
Wed Jun 11 02:48:52 PDT 2014
Hi rafael, majnemer, bkramer,
Remove duplicate code from "InstCombineShift".
This is already being handled in "SimplifyAShrInst".
No regression observed. No functionality change.
Please help in reviewing this code.
Thanks,
Suyog
http://reviews.llvm.org/D4099
Files:
lib/Transforms/InstCombine/InstCombineShifts.cpp
Index: lib/Transforms/InstCombine/InstCombineShifts.cpp
===================================================================
--- lib/Transforms/InstCombine/InstCombineShifts.cpp
+++ lib/Transforms/InstCombine/InstCombineShifts.cpp
@@ -789,11 +789,6 @@
// have a sign-extend idiom.
Value *X;
if (match(Op0, m_Shl(m_Value(X), m_Specific(Op1)))) {
- // If the left shift is just shifting out partial signbits, delete the
- // extension.
- if (cast<OverflowingBinaryOperator>(Op0)->hasNoSignedWrap())
- return ReplaceInstUsesWith(I, X);
-
// If the input is an extension from the shifted amount value, e.g.
// %x = zext i8 %A to i32
// %y = shl i32 %x, 24
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4099.10317.patch
Type: text/x-patch
Size: 713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140611/f73e87eb/attachment.bin>
More information about the llvm-commits
mailing list