mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
Make testb optimization work on big-endian targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58874 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
413a89f318
commit
b514ac9e3c
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user