OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
413a89f
)
Make testb optimization work on big-endian targets.
author
Dale Johannesen
<dalej@apple.com>
Sat, 8 Nov 2008 00:01:16 +0000
(
00:01
+0000)
committer
Dale Johannesen
<dalej@apple.com>
Sat, 8 Nov 2008 00:01:16 +0000
(
00:01
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58874
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/TargetLowering.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index
0a8538a
..
cf26166
100644
(file)
--- a/
lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/
lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@
-1370,7
+1370,10
@@
TargetLowering::SimplifySetCC(MVT VT, SDValue N0, SDValue N1,
uint64_t newMask = (1ULL << width) - 1;
for (unsigned offset=0; offset<origWidth/width; offset++) {
if ((newMask & Mask)==Mask) {
- bestOffset = (uint64_t)offset * (width/8);
+ if (!TD->isLittleEndian())
+ bestOffset = (origWidth/width - offset - 1) * (width/8);
+ else
+ bestOffset = (uint64_t)offset * (width/8);
bestWidth = width;
break;
}