diff options
author | XinWang10 <xin10.wang@intel.com> | 2023-07-09 23:21:02 -0400 |
---|---|---|
committer | Wang, Xin10 <xin10.wang@intel.com> | 2023-07-09 23:21:32 -0400 |
commit | 2c64226d84174dd1d9f93e1884c1b0bd432f89b5 (patch) | |
tree | 011b4d4e8f305965f2cf02e9a06ba49c38bdcb9a /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 8542d8f3cdc269f3dd786cc88606f0cf39174665 (diff) | |
download | llvm-2c64226d84174dd1d9f93e1884c1b0bd432f89b5.zip llvm-2c64226d84174dd1d9f93e1884c1b0bd432f89b5.tar.gz llvm-2c64226d84174dd1d9f93e1884c1b0bd432f89b5.tar.bz2 |
[X86]Remove TEST in AND32ri+TEST16rr in peephole-opt
Previously we remove a pattern like:
%reg = and32ri %in_reg, 5
... // EFLAGS not changed.
%src_reg = subreg_to_reg 0, %reg, %subreg.sub_index
test64rr %src_reg, %src_reg, implicit-def $eflags
We can remove test64rr since it has same functionality as and subreg_to_reg avoid the opt in previous code, so we handle this case specially.
And this case is also can be opted for the same reason, like:
%reg = and32ri %in_reg, 5
... // EFLAGS not changed.
%src_reg = copy %reg.sub_16bit:gr32
test16rr %src_reg, %src_reg, implicit-def $eflags
The COPY from gr32 to gr16 prevent the opt in previous code too, just handle it specially as what we did for test64rr.
Reviewed By: skan
Differential Revision: https://reviews.llvm.org/D154193
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions