summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2012-03-26 19:13:57 +0000
committerChris Lattner <sabre@nondot.org>2012-03-26 19:13:57 +0000
commitb1e2e1e091dbede2c62ff52f28fd06796ea166b0 (patch)
treeb2b8ed28834d857351f5be5cd5e2deb98360bfc2 /llvm/lib
parent9e4e3352817b78aa056447254637adfb5c192b73 (diff)
downloadbcm5719-llvm-b1e2e1e091dbede2c62ff52f28fd06796ea166b0.tar.gz
bcm5719-llvm-b1e2e1e091dbede2c62ff52f28fd06796ea166b0.zip
eliminate an unneeded branch, part of PR12357
llvm-svn: 153458
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
index 1165660f40f..0dbe11d2f01 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
@@ -1362,13 +1362,8 @@ static bool CollectBSwapParts(Value *V, int OverallLeftShift, uint32_t ByteMask,
// part of the value (e.g. byte 3) then it must be shifted right. If from the
// low part, it must be shifted left.
unsigned DestByteNo = InputByteNo + OverallLeftShift;
- if (InputByteNo < ByteValues.size()/2) {
- if (ByteValues.size()-1-DestByteNo != InputByteNo)
- return true;
- } else {
- if (ByteValues.size()-1-DestByteNo != InputByteNo)
- return true;
- }
+ if (ByteValues.size()-1-DestByteNo != InputByteNo)
+ return true;
// If the destination byte value is already defined, the values are or'd
// together, which isn't a bswap (unless it's an or of the same bits).
OpenPOWER on IntegriCloud