diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-09-28 02:50:50 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-09-28 02:50:50 +0000 |
commit | 9c598cfebcc3387676995873e65ae4fed96b3edc (patch) | |
tree | 1da7067848100b72dee7a60974c1734b2e468769 /test/CodeGen/R600/set-dx10.ll | |
parent | bbafe422d6f9036b03992ee5eacb5d09644c3267 (diff) | |
download | external_llvm-9c598cfebcc3387676995873e65ae4fed96b3edc.zip external_llvm-9c598cfebcc3387676995873e65ae4fed96b3edc.tar.gz external_llvm-9c598cfebcc3387676995873e65ae4fed96b3edc.tar.bz2 |
R600: Fix handling of NAN in comparison instructions
We were completely ignoring the unorder/ordered attributes of condition
codes and also incorrectly lowering seto and setuo.
Reviewed-by: Vincent Lejeune<vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191603 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/R600/set-dx10.ll')
-rw-r--r-- | test/CodeGen/R600/set-dx10.ll | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/test/CodeGen/R600/set-dx10.ll b/test/CodeGen/R600/set-dx10.ll index bdc2ff4..5c7d499 100644 --- a/test/CodeGen/R600/set-dx10.ll +++ b/test/CodeGen/R600/set-dx10.ll @@ -30,13 +30,13 @@ entry: ret void } -; CHECK: @fcmp_ueq_select_fptosi +; CHECK: @fcmp_oeq_select_fptosi ; CHECK: SETE_DX10 {{\** *}}T{{[0-9]+\.[XYZW]}}, KC0[2].Z, literal.x, ; CHECK-NEXT: LSHR ; CHECK-NEXT: 1084227584(5.000000e+00) -define void @fcmp_ueq_select_fptosi(i32 addrspace(1)* %out, float %in) { +define void @fcmp_oeq_select_fptosi(i32 addrspace(1)* %out, float %in) { entry: - %0 = fcmp ueq float %in, 5.0 + %0 = fcmp oeq float %in, 5.0 %1 = select i1 %0, float 1.000000e+00, float 0.000000e+00 %2 = fsub float -0.000000e+00, %1 %3 = fptosi float %2 to i32 @@ -44,25 +44,25 @@ entry: ret void } -; CHECK: @fcmp_ueq_select_i32 +; CHECK: @fcmp_oeq_select_i32 ; CHECK: SETE_DX10 {{\** *}}T{{[0-9]+\.[XYZW]}}, KC0[2].Z, literal.x, ; CHECK-NEXT: LSHR ; CHECK-NEXT: 1084227584(5.000000e+00) -define void @fcmp_ueq_select_i32(i32 addrspace(1)* %out, float %in) { +define void @fcmp_oeq_select_i32(i32 addrspace(1)* %out, float %in) { entry: - %0 = fcmp ueq float %in, 5.0 + %0 = fcmp oeq float %in, 5.0 %1 = select i1 %0, i32 -1, i32 0 store i32 %1, i32 addrspace(1)* %out ret void } -; CHECK: @fcmp_ugt_select_fptosi +; CHECK: @fcmp_ogt_select_fptosi ; CHECK: SETGT_DX10 {{\** *}}T{{[0-9]+\.[XYZW]}}, KC0[2].Z, literal.x, ; CHECK-NEXT: LSHR ; CHECK-NEXT: 1084227584(5.000000e+00) -define void @fcmp_ugt_select_fptosi(i32 addrspace(1)* %out, float %in) { +define void @fcmp_ogt_select_fptosi(i32 addrspace(1)* %out, float %in) { entry: - %0 = fcmp ugt float %in, 5.0 + %0 = fcmp ogt float %in, 5.0 %1 = select i1 %0, float 1.000000e+00, float 0.000000e+00 %2 = fsub float -0.000000e+00, %1 %3 = fptosi float %2 to i32 @@ -70,25 +70,25 @@ entry: ret void } -; CHECK: @fcmp_ugt_select_i32 +; CHECK: @fcmp_ogt_select_i32 ; CHECK: SETGT_DX10 {{\** *}}T{{[0-9]+\.[XYZW]}}, KC0[2].Z, literal.x, ; CHECK-NEXT: LSHR ; CHECK-NEXT: 1084227584(5.000000e+00) -define void @fcmp_ugt_select_i32(i32 addrspace(1)* %out, float %in) { +define void @fcmp_ogt_select_i32(i32 addrspace(1)* %out, float %in) { entry: - %0 = fcmp ugt float %in, 5.0 + %0 = fcmp ogt float %in, 5.0 %1 = select i1 %0, i32 -1, i32 0 store i32 %1, i32 addrspace(1)* %out ret void } -; CHECK: @fcmp_uge_select_fptosi +; CHECK: @fcmp_oge_select_fptosi ; CHECK: SETGE_DX10 {{\** *}}T{{[0-9]+\.[XYZW]}}, KC0[2].Z, literal.x, ; CHECK-NEXT: LSHR ; CHECK-NEXT: 1084227584(5.000000e+00) -define void @fcmp_uge_select_fptosi(i32 addrspace(1)* %out, float %in) { +define void @fcmp_oge_select_fptosi(i32 addrspace(1)* %out, float %in) { entry: - %0 = fcmp uge float %in, 5.0 + %0 = fcmp oge float %in, 5.0 %1 = select i1 %0, float 1.000000e+00, float 0.000000e+00 %2 = fsub float -0.000000e+00, %1 %3 = fptosi float %2 to i32 @@ -96,25 +96,25 @@ entry: ret void } -; CHECK: @fcmp_uge_select_i32 +; CHECK: @fcmp_oge_select_i32 ; CHECK: SETGE_DX10 {{\** *}}T{{[0-9]+\.[XYZW]}}, KC0[2].Z, literal.x, ; CHECK-NEXT: LSHR ; CHECK-NEXT: 1084227584(5.000000e+00) -define void @fcmp_uge_select_i32(i32 addrspace(1)* %out, float %in) { +define void @fcmp_oge_select_i32(i32 addrspace(1)* %out, float %in) { entry: - %0 = fcmp uge float %in, 5.0 + %0 = fcmp oge float %in, 5.0 %1 = select i1 %0, i32 -1, i32 0 store i32 %1, i32 addrspace(1)* %out ret void } -; CHECK: @fcmp_ule_select_fptosi +; CHECK: @fcmp_ole_select_fptosi ; CHECK: SETGE_DX10 {{\** *}}T{{[0-9]+\.[XYZW]}}, literal.x, KC0[2].Z, ; CHECK-NEXT: LSHR ; CHECK-NEXT: 1084227584(5.000000e+00) -define void @fcmp_ule_select_fptosi(i32 addrspace(1)* %out, float %in) { +define void @fcmp_ole_select_fptosi(i32 addrspace(1)* %out, float %in) { entry: - %0 = fcmp ule float %in, 5.0 + %0 = fcmp ole float %in, 5.0 %1 = select i1 %0, float 1.000000e+00, float 0.000000e+00 %2 = fsub float -0.000000e+00, %1 %3 = fptosi float %2 to i32 @@ -122,25 +122,25 @@ entry: ret void } -; CHECK: @fcmp_ule_select_i32 +; CHECK: @fcmp_ole_select_i32 ; CHECK: SETGE_DX10 {{\** *}}T{{[0-9]+\.[XYZW]}}, literal.x, KC0[2].Z, ; CHECK-NEXT: LSHR ; CHECK-NEXT: 1084227584(5.000000e+00) -define void @fcmp_ule_select_i32(i32 addrspace(1)* %out, float %in) { +define void @fcmp_ole_select_i32(i32 addrspace(1)* %out, float %in) { entry: - %0 = fcmp ule float %in, 5.0 + %0 = fcmp ole float %in, 5.0 %1 = select i1 %0, i32 -1, i32 0 store i32 %1, i32 addrspace(1)* %out ret void } -; CHECK: @fcmp_ult_select_fptosi +; CHECK: @fcmp_olt_select_fptosi ; CHECK: SETGT_DX10 {{\** *}}T{{[0-9]+\.[XYZW]}}, literal.x, KC0[2].Z, ; CHECK-NEXT: LSHR ; CHECK-NEXT: 1084227584(5.000000e+00) -define void @fcmp_ult_select_fptosi(i32 addrspace(1)* %out, float %in) { +define void @fcmp_olt_select_fptosi(i32 addrspace(1)* %out, float %in) { entry: - %0 = fcmp ult float %in, 5.0 + %0 = fcmp olt float %in, 5.0 %1 = select i1 %0, float 1.000000e+00, float 0.000000e+00 %2 = fsub float -0.000000e+00, %1 %3 = fptosi float %2 to i32 @@ -148,13 +148,13 @@ entry: ret void } -; CHECK: @fcmp_ult_select_i32 +; CHECK: @fcmp_olt_select_i32 ; CHECK: SETGT_DX10 {{\** *}}T{{[0-9]+\.[XYZW]}}, literal.x, KC0[2].Z, ; CHECK-NEXT: LSHR ; CHECK-NEXT: 1084227584(5.000000e+00) -define void @fcmp_ult_select_i32(i32 addrspace(1)* %out, float %in) { +define void @fcmp_olt_select_i32(i32 addrspace(1)* %out, float %in) { entry: - %0 = fcmp ult float %in, 5.0 + %0 = fcmp olt float %in, 5.0 %1 = select i1 %0, i32 -1, i32 0 store i32 %1, i32 addrspace(1)* %out ret void |