Match the ordering semantics of non-vector comparisons. For
floating point comparisons that do not correspond to instructions, the
tests check that some vector comparison instruction was emitted but do
not care about the full implementation.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 22449 Build 22449: arc lint + arc unit
Event Timeline
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td | ||
---|---|---|
149 | When do you use simdop and when do you use baseInst? Do you use it interchangeably? If so we should use the same variable name I guess. (In previous patches too.) | |
169 | I can see why you added this class, but that some instructions use this and the others bypasses this and directly use SIMDConditionInt and SIMDConditionFP directly looks a bit confusing to me. Even if we delete this and manually add _u instructions below, it's gonna be only (?) +8 lines, so I guess it'd be easier to read that way..? | |
test/CodeGen/WebAssembly/comparisons_simd.ll | ||
1 ↗ | (On Diff #164331) | How about renaming this to simd-comparisons.ll to match other file name conventions you've added so far? |
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td | ||
---|---|---|
149 | I try to use baseInst when the multiclass will add constants to it to create new opcodes and simdop when it will be used as-is. I will go through and make sure this usage is consistent. I would also be fine with changing them all to simdop if you think that would make more sense. | |
test/CodeGen/WebAssembly/comparisons_simd.ll | ||
1 ↗ | (On Diff #164331) | I named it this way to be consistent with comparisons_f32.ll, comparisons_i32.ll and friends. Those files should probably be renamed for consistency in a separate CL as well. What do you think of comparisons-i32.ll, comparisons-simd.ll, etc? |
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td | ||
---|---|---|
149 | Oh, I see. The usage makes sense I think. | |
test/CodeGen/WebAssembly/comparisons_simd.ll | ||
1 ↗ | (On Diff #164331) | Hmm, yeah, they look like the only ones with underscores in file names. I think renaming them also is a good idea. But other SIMD-related test files all start with simd-, like simd-arith.ll or simd-conversions.ll, so I guess putting simd first makes more sense. Wait, there's an exception, there are exceptions that start with offset-. :facepalm: But anyway. |
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td | ||
---|---|---|
339 | Could you elaborate what this comment means and why we need this only for floats? |
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td | ||
---|---|---|
339 | I don't really understand what "Lower don't float comparisons" means... Did you mean "Don't lower float comparisons?" |
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td | ||
---|---|---|
348 |
|
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td | ||
---|---|---|
348 |
|
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td | ||
---|---|---|
342 | LGTM with one nit: wrap comment around 80 col |
When do you use simdop and when do you use baseInst? Do you use it interchangeably? If so we should use the same variable name I guess. (In previous patches too.)