Run inst combine before memory optimizations.
We were previously emitting 64-bit indexing for some gathers where 32-bit was actually fine, due to some adds of constant vectors that hadn't been simplified to the result.
This commit is contained in:
3
opt.cpp
3
opt.cpp
@@ -447,6 +447,7 @@ Optimize(llvm::Module *module, int optLevel) {
|
||||
|
||||
if (g->opt.disableGatherScatterOptimizations == false &&
|
||||
g->target.vectorWidth > 1) {
|
||||
optPM.add(llvm::createInstructionCombiningPass());
|
||||
optPM.add(CreateImproveMemoryOpsPass());
|
||||
}
|
||||
if (!g->opt.disableMaskAllOnOptimizations) {
|
||||
@@ -489,6 +490,7 @@ Optimize(llvm::Module *module, int optLevel) {
|
||||
|
||||
if (g->opt.disableGatherScatterOptimizations == false &&
|
||||
g->target.vectorWidth > 1) {
|
||||
optPM.add(llvm::createInstructionCombiningPass());
|
||||
optPM.add(CreateImproveMemoryOpsPass());
|
||||
|
||||
if (g->opt.disableCoalescing == false &&
|
||||
@@ -507,6 +509,7 @@ Optimize(llvm::Module *module, int optLevel) {
|
||||
|
||||
if (g->opt.disableGatherScatterOptimizations == false &&
|
||||
g->target.vectorWidth > 1) {
|
||||
optPM.add(llvm::createInstructionCombiningPass());
|
||||
optPM.add(CreateImproveMemoryOpsPass());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user