diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2017-09-07 14:52:26 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2017-09-07 14:52:26 +0000 |
commit | 6ef976d5e1f47c606df19a08a232146ed7ce4c20 (patch) | |
tree | 8ce5683d11ea4158a53c98b71549e6d64ab26ea1 /llvm/test/CodeGen/ARM/vcvt.ll | |
parent | ceeb8b91e7512e01f47289cc981dc5b386edbc06 (diff) | |
download | bcm5719-llvm-6ef976d5e1f47c606df19a08a232146ed7ce4c20.tar.gz bcm5719-llvm-6ef976d5e1f47c606df19a08a232146ed7ce4c20.zip |
[ARM] Remove redundant vcvt patterns.
These don't add any value as they're just compositions of existing
patterns. However, they can confuse the cost logic in ISel, leading to
duplicated vcvt instructions like in PR33199.
llvm-svn: 312724
Diffstat (limited to 'llvm/test/CodeGen/ARM/vcvt.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/vcvt.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/vcvt.ll b/llvm/test/CodeGen/ARM/vcvt.ll index 78105f7e0ad..0d7dc542bae 100644 --- a/llvm/test/CodeGen/ARM/vcvt.ll +++ b/llvm/test/CodeGen/ARM/vcvt.ll @@ -197,3 +197,22 @@ define <2 x i64> @fix_double_to_i64(<2 x double> %in) { ret <2 x i64> %conv } +define i32 @multi_sint(double %c, i32* nocapture %p, i32* nocapture %q) { + %conv = fptosi double %c to i32 + store i32 %conv, i32* %p, align 4 + store i32 %conv, i32* %q, align 4 + ret i32 %conv +; CHECK-LABEL: multi_sint: +; CHECK: vcvt.s32.f64 +; CHECK-NOT: vcvt +} + +define i32 @multi_uint(double %c, i32* nocapture %p, i32* nocapture %q) { + %conv = fptoui double %c to i32 + store i32 %conv, i32* %p, align 4 + store i32 %conv, i32* %q, align 4 + ret i32 %conv +; CHECK-LABEL: multi_uint: +; CHECK: vcvt.u32.f64 +; CHECK-NOT: vcvt +} |