1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s | FileCheck %s
4 target triple = "wasm32-unknown-unknown"
6 define i32 @reassociate_xor(float %x, float %y) {
7 ; CHECK-LABEL: reassociate_xor:
8 ; CHECK: .functype reassociate_xor (f32, f32) -> (i32)
9 ; CHECK-NEXT: .local i32
10 ; CHECK-NEXT: # %bb.0: # %entry
11 ; CHECK-NEXT: i32.const 1
12 ; CHECK-NEXT: local.set 2
14 ; CHECK-NEXT: local.get 1
15 ; CHECK-NEXT: f32.const 0x1p-23
17 ; CHECK-NEXT: local.get 0
18 ; CHECK-NEXT: f32.const 0x1p-23
21 ; CHECK-NEXT: br_if 0 # 0: down to label0
22 ; CHECK-NEXT: # %bb.1: # %if.then.i
23 ; CHECK-NEXT: i32.const 0
24 ; CHECK-NEXT: local.set 2
25 ; CHECK-NEXT: .LBB0_2: # %if.end.i
26 ; CHECK-NEXT: end_block # label0:
27 ; CHECK-NEXT: local.get 2
28 ; CHECK-NEXT: # fallthrough-return
29 entry: ; preds = %if.then, %entry
30 %cmp0 = fcmp ule float %x, 0x3E80000000000000
31 %cmp1 = fcmp ugt float %y, 0x3E80000000000000
32 %cmp2 = xor i1 %cmp0, %cmp1
33 br i1 %cmp2, label %if.end.i, label %if.then.i
35 if.then.i: ; preds = %if.end
38 if.end.i: ; preds = %if.then.i, %if.end
39 %s = phi i32 [ 1, %entry ], [ 0, %if.then.i ]