diff options
author | Juneyoung Lee <aqjune@gmail.com> | 2020-02-28 18:47:57 +0900 |
---|---|---|
committer | Juneyoung Lee <aqjune@gmail.com> | 2020-02-28 20:35:20 +0900 |
commit | cc28a754679a2c85625e719944154fe82491f008 (patch) | |
tree | 7eeb5d80e174b434cc3aece4ec6049a2093a281a /llvm/unittests/CodeGen/MachineInstrTest.cpp | |
parent | 6b035b607f5f5e4db6f1ca51340d7a87b5807a0c (diff) | |
download | llvm-cc28a754679a2c85625e719944154fe82491f008.zip llvm-cc28a754679a2c85625e719944154fe82491f008.tar.gz llvm-cc28a754679a2c85625e719944154fe82491f008.tar.bz2 |
Let EarlyCSE fold equivalent freeze instructions
Summary:
This patch makes EarlyCSE fold equivalent freeze instructions.
Another optimization that I think will be useful is to remove freeze if its operand is used as a branch condition or at llvm.assume:
```
%c = ...
br i1 %c, label %A, ..
A:
%d = freeze %c ; %d can be optimized to %c because %c cannot be poison or undef (or 'br %c' would be UB otherwise)
```
If it make sense for EarlyCSE to support this as well, I will make a patch for this.
Reviewers: spatel, reames, lebedev.ri
Reviewed By: lebedev.ri
Subscribers: lebedev.ri, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75334
Diffstat (limited to 'llvm/unittests/CodeGen/MachineInstrTest.cpp')
0 files changed, 0 insertions, 0 deletions