summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/WebAssembly/comparisons_i32.ll
diff options
context:
space:
mode:
authorJF Bastien <jfb@google.com>2015-08-12 17:53:29 +0000
committerJF Bastien <jfb@google.com>2015-08-12 17:53:29 +0000
commit71d29acecd245fb62d7f1f5900505c94df09618a (patch)
tree40c0037e3b38ed61e3d8086c777855a3a6511a8b /llvm/test/CodeGen/WebAssembly/comparisons_i32.ll
parentd06034d20a7eeb4b43e27e618c9ba0b076e18b39 (diff)
downloadbcm5719-llvm-71d29acecd245fb62d7f1f5900505c94df09618a.tar.gz
bcm5719-llvm-71d29acecd245fb62d7f1f5900505c94df09618a.zip
WebAssembly: floating-point comparisons
Summary: D11924 implemented part of the floating-point comparisons, this patch implements the rest: * Tell ISelLowering that all booleans are either 0 or 1. * Expand the eq/ne/lt/le/gt/ge floating-point comparisons to the canonical ones (similar to what Mips32r6InstrInfo.td does). * Add tests for ord/uno. * Add tests for ueq/one/ult/ule/ugt/uge. * Fix existing comparison tests to remove the (res & 1) code, which setBooleanContents stops from generating. Reviewers: sunfish Subscribers: llvm-commits, jfb Differential Revision: http://reviews.llvm.org/D11970 llvm-svn: 244779
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/comparisons_i32.ll')
-rw-r--r--llvm/test/CodeGen/WebAssembly/comparisons_i32.ll4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/comparisons_i32.ll b/llvm/test/CodeGen/WebAssembly/comparisons_i32.ll
index 3dc387f39e9..f45c6ec0a21 100644
--- a/llvm/test/CodeGen/WebAssembly/comparisons_i32.ll
+++ b/llvm/test/CodeGen/WebAssembly/comparisons_i32.ll
@@ -9,9 +9,7 @@ target triple = "wasm32-unknown-unknown"
; CHECK-NEXT: (setlocal @0 (argument 1))
; CHECK-NEXT: (setlocal @1 (argument 0))
; CHECK-NEXT: (setlocal @2 (eq @1 @0))
-; CHECK-NEXT: (setlocal @3 (immediate 1))
-; CHECK-NEXT: (setlocal @4 (and @2 @3))
-; CHECK-NEXT: (return @4)
+; CHECK-NEXT: (return @2)
define i32 @eq_i32(i32 %x, i32 %y) {
%a = icmp eq i32 %x, %y
%b = zext i1 %a to i32
OpenPOWER on IntegriCloud