summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/R600/fmax_legacy.ll
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2014-11-13 23:03:09 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2014-11-13 23:03:09 +0000
commitda59f3de450d31b8bc9f21e217d45f6f9ceeadd7 (patch)
treeffecbc236f7fcd129584c8d128c7e28f97e54c98 /llvm/test/CodeGen/R600/fmax_legacy.ll
parent971c3ea67b7ba140a5d7634111fd1063d86d2cdd (diff)
downloadbcm5719-llvm-da59f3de450d31b8bc9f21e217d45f6f9ceeadd7.tar.gz
bcm5719-llvm-da59f3de450d31b8bc9f21e217d45f6f9ceeadd7.zip
R600/SI: Fix fmin_legacy / fmax_legacy matching for SI
select_cc is expanded on SI, so this was never matched. llvm-svn: 221941
Diffstat (limited to 'llvm/test/CodeGen/R600/fmax_legacy.ll')
-rw-r--r--llvm/test/CodeGen/R600/fmax_legacy.ll42
1 files changed, 42 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/R600/fmax_legacy.ll b/llvm/test/CodeGen/R600/fmax_legacy.ll
new file mode 100644
index 00000000000..9bfff8a7d80
--- /dev/null
+++ b/llvm/test/CodeGen/R600/fmax_legacy.ll
@@ -0,0 +1,42 @@
+; RUN: llc -march=r600 -mcpu=SI < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
+; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
+
+; FUNC-LABEL: @test_fmax_legacy_uge_f32
+; SI: v_max_legacy_f32_e32
+; EG: MAX
+define void @test_fmax_legacy_uge_f32(float addrspace(1)* %out, float %a, float %b) nounwind {
+ %cmp = fcmp uge float %a, %b
+ %val = select i1 %cmp, float %a, float %b
+ store float %val, float addrspace(1)* %out, align 4
+ ret void
+}
+
+; FUNC-LABEL: @test_fmax_legacy_oge_f32
+; SI: v_max_legacy_f32_e32
+; EG: MAX
+define void @test_fmax_legacy_oge_f32(float addrspace(1)* %out, float %a, float %b) nounwind {
+ %cmp = fcmp oge float %a, %b
+ %val = select i1 %cmp, float %a, float %b
+ store float %val, float addrspace(1)* %out, align 4
+ ret void
+}
+
+; FUNC-LABEL: @test_fmax_legacy_ugt_f32
+; SI: v_max_legacy_f32_e32
+; EG: MAX
+define void @test_fmax_legacy_ugt_f32(float addrspace(1)* %out, float %a, float %b) nounwind {
+ %cmp = fcmp ugt float %a, %b
+ %val = select i1 %cmp, float %a, float %b
+ store float %val, float addrspace(1)* %out, align 4
+ ret void
+}
+
+; FUNC-LABEL: @test_fmax_legacy_ogt_f32
+; SI: v_max_legacy_f32_e32
+; EG: MAX
+define void @test_fmax_legacy_ogt_f32(float addrspace(1)* %out, float %a, float %b) nounwind {
+ %cmp = fcmp ogt float %a, %b
+ %val = select i1 %cmp, float %a, float %b
+ store float %val, float addrspace(1)* %out, align 4
+ ret void
+}
OpenPOWER on IntegriCloud