diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2017-12-14 22:05:20 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2017-12-14 22:05:20 +0000 |
| commit | 0ab0c1a201ece292fdced1f913fa257bdcb5280f (patch) | |
| tree | e896fb6f22c7ce9f2106707b0796e7cab2c2c59e /llvm/test/Transforms/PhaseOrdering | |
| parent | 34ccadcea9eba33d2e410b2af843a3da602611bf (diff) | |
| download | bcm5719-llvm-0ab0c1a201ece292fdced1f913fa257bdcb5280f.tar.gz bcm5719-llvm-0ab0c1a201ece292fdced1f913fa257bdcb5280f.zip | |
[SimplifyCFG] don't sink common insts too soon (PR34603)
This should solve:
https://bugs.llvm.org/show_bug.cgi?id=34603
...by preventing SimplifyCFG from altering redundant instructions before early-cse has a chance to run.
It changes the default (canonical-forming) behavior of SimplifyCFG, so we're only doing the
sinking transform later in the optimization pipeline.
Differential Revision: https://reviews.llvm.org/D38566
llvm-svn: 320749
Diffstat (limited to 'llvm/test/Transforms/PhaseOrdering')
| -rw-r--r-- | llvm/test/Transforms/PhaseOrdering/simplifycfg-options.ll | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/test/Transforms/PhaseOrdering/simplifycfg-options.ll b/llvm/test/Transforms/PhaseOrdering/simplifycfg-options.ll index fcb9a552966..69346234635 100644 --- a/llvm/test/Transforms/PhaseOrdering/simplifycfg-options.ll +++ b/llvm/test/Transforms/PhaseOrdering/simplifycfg-options.ll @@ -76,10 +76,8 @@ define double @max_of_loads(double* %x, double* %y, i64 %i) { ; ALL-NEXT: [[XI:%.*]] = load double, double* [[XI_PTR]], align 8 ; ALL-NEXT: [[YI:%.*]] = load double, double* [[YI_PTR]], align 8 ; ALL-NEXT: [[CMP:%.*]] = fcmp ogt double [[XI]], [[YI]] -; ALL-NEXT: [[Y_SINK:%.*]] = select i1 [[CMP]], double* [[X]], double* [[Y]] -; ALL-NEXT: [[YI_PTR_AGAIN:%.*]] = getelementptr double, double* [[Y_SINK]], i64 [[I]] -; ALL-NEXT: [[YI_AGAIN:%.*]] = load double, double* [[YI_PTR_AGAIN]], align 8 -; ALL-NEXT: ret double [[YI_AGAIN]] +; ALL-NEXT: [[XI_YI:%.*]] = select i1 [[CMP]], double [[XI]], double [[YI]] +; ALL-NEXT: ret double [[XI_YI]] ; entry: %xi_ptr = getelementptr double, double* %x, i64 %i |

