diff options
author | Kevin Qin <Kevin.Qin@arm.com> | 2014-02-14 09:41:15 +0000 |
---|---|---|
committer | Kevin Qin <Kevin.Qin@arm.com> | 2014-02-14 09:41:15 +0000 |
commit | 54136cad2ea9f322849ce49b299860454fc97368 (patch) | |
tree | c5933d88a63e4f98a9290743aa4cc4e8365f9691 /test/CodeGen | |
parent | 89eb5dc65da7ce41d795277f8aa1503e6d82fe7b (diff) | |
download | llvm-54136cad2ea9f322849ce49b299860454fc97368.tar.gz llvm-54136cad2ea9f322849ce49b299860454fc97368.tar.bz2 llvm-54136cad2ea9f322849ce49b299860454fc97368.tar.xz |
[AArch64 NEON] Fix a bug to avoid using floating type as condition type in lowering SELECT_CC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201395 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/AArch64/neon-select_cc.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/neon-select_cc.ll b/test/CodeGen/AArch64/neon-select_cc.ll index 537ec97d36..f6b5d3ca57 100644 --- a/test/CodeGen/AArch64/neon-select_cc.ll +++ b/test/CodeGen/AArch64/neon-select_cc.ll @@ -160,6 +160,17 @@ define <4x float> @test_select_cc_v4f32(float %a, float %b, <4x float> %c, <4x f ret <4x float> %e } +define <4x float> @test_select_cc_v4f32_icmp(i32 %a, i32 %b, <4x float> %c, <4x float> %d ) { +; CHECK-LABEL: test_select_cc_v4f32_icmp: +; CHECK: cmp w0, w1, uxtw +; CHECK: csinv w0, wzr, wzr, ne +; CHECK-NEXT: dup v{{[0-9]+}}.4s, w0 +; CHECK-NEXT: bsl v{{[0-9]+}}.16b, v0.16b, v1.16b + %cmp31 = icmp eq i32 %a, %b + %e = select i1 %cmp31, <4x float> %c, <4x float> %d + ret <4x float> %e +} + define <1 x double> @test_select_cc_v1f64(double %a, double %b, <1 x double> %c, <1 x double> %d ) { ; CHECK-LABEL: test_select_cc_v1f64: ; CHECK: fcmeq v{{[0-9]+}}.2d, v0.2d, v1.2d @@ -169,6 +180,17 @@ define <1 x double> @test_select_cc_v1f64(double %a, double %b, <1 x double> %c, ret <1 x double> %e } +define <1 x double> @test_select_cc_v1f64_icmp(i64 %a, i64 %b, <1 x double> %c, <1 x double> %d ) { +; CHECK-LABEL: test_select_cc_v1f64_icmp: +; CHECK: cmp x0, x1 +; CHECK-NEXT: csinv x0, xzr, xzr, ne +; CHECK-NEXT: fmov d{{[0-9]+}}, x0 +; CHECK-NEXT: bsl v{{[0-9]+}}.8b, v0.8b, v1.8b + %cmp31 = icmp eq i64 %a, %b + %e = select i1 %cmp31, <1 x double> %c, <1 x double> %d + ret <1 x double> %e +} + define <2 x double> @test_select_cc_v2f64(double %a, double %b, <2 x double> %c, <2 x double> %d ) { ; CHECK-LABEL: test_select_cc_v2f64: ; CHECK: fcmeq v{{[0-9]+}}.2d, v0.2d, v1.2d |