Some of the FP comparisons (ueq, one, ult, ule, ugt, uge) are currently broken, I'll fix them in a follow-up.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/WebAssembly/WebAssemblyInstrFloat.td | ||
---|---|---|
27 ↗ | (On Diff #31749) | The unordered comparisons (except "une") will be legalized. The optimization to do here is to fold the "don't care" comparisons to supported comparisons. |
29 ↗ | (On Diff #31749) | The NE operator is "une" rather than "one". |
33 ↗ | (On Diff #31749) | This patch lacks tests for the floating point comparisons. |
lib/Target/WebAssembly/WebAssemblyInstrFloat.td | ||
---|---|---|
31–37 ↗ | (On Diff #31761) | I'm not sure I get what you mean about the "don't care" comparisons. You mean TRUE and FALSE? |
33 ↗ | (On Diff #31761) | I've been reading the DAG legalization code... I'm not sure I get it yet. I uploaded an intermediate update which is broken for now (and the CHECK are wrong, because I haven't settled on which expansions are needed)... I'm not sure I get the expansion order. Right now it says it can't select ueq, but it should have been expanded. |
37 ↗ | (On Diff #31761) | I'll add f64 when f32 works. |
- Use the same 3-operand setcc+cond for FP comparisons as for int. It shouldn't change anything because of TargetSelectionDAG.td:910, but this is confusing...
- Add (broken) f32 test, trying to expand unsupported floating-point comparisons.
- Fix typo.
- Use the same 3-operand setcc+cond for FP comparisons as for int. It shouldn't change anything because of TargetSelectionDAG.td:910, but this is confusing...
- Remove currently broken FP comparisons (ueq, one, ult, ule, ugt, uge), so I can commit this and fix the broken ones separately.
I'll commit this patch since the functionality it adds is correct, and I'll address broken FP comparisons in a follow-up.