diff options
| author | Michael Berg <michael_c_berg@apple.com> | 2018-06-05 18:12:25 +0000 |
|---|---|---|
| committer | Michael Berg <michael_c_berg@apple.com> | 2018-06-05 18:12:25 +0000 |
| commit | 8f6d6c817d6231c61c1bb04b98f7e5528e4b9ac4 (patch) | |
| tree | edbbc064b92cc8ee9aa27815f5922ac9709b7d2f /llvm/test/CodeGen/PowerPC | |
| parent | 236c3f9c4abd128eb6f2b5ab107764bcbb9df2da (diff) | |
| download | bcm5719-llvm-8f6d6c817d6231c61c1bb04b98f7e5528e4b9ac4.tar.gz bcm5719-llvm-8f6d6c817d6231c61c1bb04b98f7e5528e4b9ac4.zip | |
NFC: adding baseline fneg case for fmf
llvm-svn: 334035
Diffstat (limited to 'llvm/test/CodeGen/PowerPC')
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/fmf-propagation.ll | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/fmf-propagation.ll b/llvm/test/CodeGen/PowerPC/fmf-propagation.ll index b4fb412dda2..3a9c844c238 100644 --- a/llvm/test/CodeGen/PowerPC/fmf-propagation.ll +++ b/llvm/test/CodeGen/PowerPC/fmf-propagation.ll @@ -457,3 +457,31 @@ define double @log2_approx(double %x) nounwind { ret double %r } +; -(X - Y) --> (Y - X) + +; FMFDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'fneg_fsub_nozeros_1:' +; FMFDEBUG: fsub {{t[0-9]+}}, {{t[0-9]+}} +; FMFDEBUG: Type-legalized selection DAG: %bb.0 'fneg_fsub_nozeros_1:' + +; GLOBALDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'fneg_fsub_nozeros_1:' +; GLOBALDEBUG: fsub {{t[0-9]+}}, {{t[0-9]+}} +; GLOBALDEBUG: Type-legalized selection DAG: %bb.0 'fneg_fsub_nozeros_1:' + +define float @fneg_fsub_nozeros_1(float %x, float %y, float %z) { +; FMF-LABEL: fneg_fsub_nozeros_1: +; FMF: # %bb.0: +; FMF-NEXT: xssubsp 0, 1, 2 +; FMF-NEXT: xxlxor 13, 13, 13 +; FMF-NEXT: xssubsp 1, 13, 0 +; FMF-NEXT: blr +; +; GLOBAL-LABEL: fneg_fsub_nozeros_1: +; GLOBAL: # %bb.0: +; GLOBAL-NEXT: xssubsp 0, 1, 2 +; GLOBAL-NEXT: xxlxor 13, 13, 13 +; GLOBAL-NEXT: xssubsp 1, 13, 0 +; GLOBAL-NEXT: blr + %neg = fsub float %x, %y + %add = fsub float 0.0, %neg + ret float %add +} |

