mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Strength reduce constant-sized vectors into arrays. No functionality change.
llvm-svn: 220412
This commit is contained in:
parent
373678636f
commit
a6c059251d
@ -3154,7 +3154,7 @@ SDValue DAGCombiner::MatchBSwapHWordLow(SDNode *N, SDValue N0, SDValue N1,
|
|||||||
/// ((x & 0x0000ff00) >> 8) |
|
/// ((x & 0x0000ff00) >> 8) |
|
||||||
/// ((x & 0x00ff0000) << 8) |
|
/// ((x & 0x00ff0000) << 8) |
|
||||||
/// ((x & 0xff000000) >> 8)
|
/// ((x & 0xff000000) >> 8)
|
||||||
static bool isBSwapHWordElement(SDValue N, SmallVectorImpl<SDNode *> &Parts) {
|
static bool isBSwapHWordElement(SDValue N, MutableArrayRef<SDNode *> Parts) {
|
||||||
if (!N.getNode()->hasOneUse())
|
if (!N.getNode()->hasOneUse())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -3237,7 +3237,6 @@ SDValue DAGCombiner::MatchBSwapHWord(SDNode *N, SDValue N0, SDValue N1) {
|
|||||||
if (!TLI.isOperationLegal(ISD::BSWAP, VT))
|
if (!TLI.isOperationLegal(ISD::BSWAP, VT))
|
||||||
return SDValue();
|
return SDValue();
|
||||||
|
|
||||||
SmallVector<SDNode*,4> Parts(4, (SDNode*)nullptr);
|
|
||||||
// Look for either
|
// Look for either
|
||||||
// (or (or (and), (and)), (or (and), (and)))
|
// (or (or (and), (and)), (or (and), (and)))
|
||||||
// (or (or (or (and), (and)), (and)), (and))
|
// (or (or (or (and), (and)), (and)), (and))
|
||||||
@ -3245,6 +3244,7 @@ SDValue DAGCombiner::MatchBSwapHWord(SDNode *N, SDValue N0, SDValue N1) {
|
|||||||
return SDValue();
|
return SDValue();
|
||||||
SDValue N00 = N0.getOperand(0);
|
SDValue N00 = N0.getOperand(0);
|
||||||
SDValue N01 = N0.getOperand(1);
|
SDValue N01 = N0.getOperand(1);
|
||||||
|
SDNode *Parts[4] = {};
|
||||||
|
|
||||||
if (N1.getOpcode() == ISD::OR &&
|
if (N1.getOpcode() == ISD::OR &&
|
||||||
N00.getNumOperands() == 2 && N01.getNumOperands() == 2) {
|
N00.getNumOperands() == 2 && N01.getNumOperands() == 2) {
|
||||||
|
@ -349,13 +349,6 @@ static bool printSymbolizedStackTrace(void **StackTrace, int Depth, FILE *FD) {
|
|||||||
sys::fs::createTemporaryFile("symbolizer-output", "", OutputFile);
|
sys::fs::createTemporaryFile("symbolizer-output", "", OutputFile);
|
||||||
FileRemover InputRemover(InputFile.c_str());
|
FileRemover InputRemover(InputFile.c_str());
|
||||||
FileRemover OutputRemover(OutputFile.c_str());
|
FileRemover OutputRemover(OutputFile.c_str());
|
||||||
std::vector<const StringRef *> Redirects(3, nullptr);
|
|
||||||
StringRef InputFileStr(InputFile);
|
|
||||||
StringRef OutputFileStr(OutputFile);
|
|
||||||
StringRef StderrFileStr;
|
|
||||||
Redirects[0] = &InputFileStr;
|
|
||||||
Redirects[1] = &OutputFileStr;
|
|
||||||
Redirects[2] = &StderrFileStr;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
raw_fd_ostream Input(InputFD, true);
|
raw_fd_ostream Input(InputFD, true);
|
||||||
@ -365,10 +358,15 @@ static bool printSymbolizedStackTrace(void **StackTrace, int Depth, FILE *FD) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StringRef InputFileStr(InputFile);
|
||||||
|
StringRef OutputFileStr(OutputFile);
|
||||||
|
StringRef StderrFileStr;
|
||||||
|
const StringRef *Redirects[] = {&InputFileStr, &OutputFileStr,
|
||||||
|
&StderrFileStr};
|
||||||
const char *Args[] = {"llvm-symbolizer", "--functions=linkage", "--inlining",
|
const char *Args[] = {"llvm-symbolizer", "--functions=linkage", "--inlining",
|
||||||
"--demangle", nullptr};
|
"--demangle", nullptr};
|
||||||
int RunResult =
|
int RunResult =
|
||||||
sys::ExecuteAndWait(LLVMSymbolizerPath, Args, nullptr, Redirects.data());
|
sys::ExecuteAndWait(LLVMSymbolizerPath, Args, nullptr, Redirects);
|
||||||
if (RunResult != 0)
|
if (RunResult != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user