[PATCH] D51765: [WebAssembly] SIMD comparisons

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 10 19:36:29 PDT 2018


tlively added inline comments.


================
Comment at: lib/Target/WebAssembly/WebAssemblyInstrSIMD.td:348
+          (vec[1] (!cast<NI>(cond#"_"#vec[0])
+            (vec[0] V128:$lhs), (vec[0] V128:$rhs)))>;
+
----------------
aheejin wrote:
> 1. Shouldn't "NE" be "ONE" here, according to the comments?
> 2. What kind of source pattern does this rule cover? I test your patch with commenting this part out, and all you tests succeed anyway.
1. No, these aren't the ordered or unordered comparison modes, these are the "don't care" comparison modes, which are allowed to be either ordered or unordered. These patterns say that these "don't care" comparisons should be lowered to whichever comparison type wasm natively supports.

2. I tried commenting this section out and the tests failed, but I was able to cut the set of comparisons here down to just `eq` and `ne`.  I'm not sure why it would have passed for you. The "don't care" float comparisons are not expressible in LLVM IR, but are emitted as isel dag nodes in the target-independent automatic expansion of `fcmp ueq` and `fcmp one`, respectively.


Repository:
  rL LLVM

https://reviews.llvm.org/D51765





More information about the llvm-commits mailing list