This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Lower SIMD nnan setcc nodes
ClosedPublic

Authored by tlively on Mar 18 2019, 3:47 PM.

Details

Summary

Adds patterns to lower all the remaining setcc modes: lt, gt,
le, and ge. Fixes PR40912.

Event Timeline

tlively created this revision.Mar 18 2019, 3:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2019, 3:47 PM
dschuff accepted this revision.Mar 18 2019, 5:36 PM

to make the change even clearer, you could just say in the commit message that it just adds the missing non-equality opcodes.

llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
422

do we also need ord? I guess ord would trivially be true since they are nnan? Anyway, not sure how exactly the dag nodes line up with the LLVM IR ones, but let's jsut make sure we aren't missing more while we're at it.

This revision is now accepted and ready to land.Mar 18 2019, 5:36 PM
tlively edited the summary of this revision. (Show Details)Mar 18 2019, 5:48 PM
tlively retitled this revision from [WebAssembly] Lower float setcc nodes with nnan to [WebAssembly] Lower SIMD nnan setcc nodes.
tlively marked an inline comment as done.Mar 18 2019, 5:50 PM
tlively added inline comments.
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
422

I have tests for ord nnan and uno nnan below. They apparently do no become no-ops, but are expanded the same as ordand uno with NaNs allowed.

I can confirm this patch appears to fix the problem on my side.

This revision was automatically updated to reflect the committed changes.