This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Fix type names in truncation builtins
ClosedPublic

Authored by tlively on Oct 25 2018, 11:58 AM.

Diff Detail

Repository
rC Clang

Event Timeline

tlively created this revision.Oct 25 2018, 11:58 AM
aheejin added inline comments.Oct 25 2018, 3:02 PM
lib/CodeGen/CGBuiltin.cpp
12609

But unlike others, isn't the input type different from the output type for this builtin? It seems other non-SIMD saturate_s intrinsics follow the same convention, trunc_saturate_s_output_input.

tlively added inline comments.Oct 31 2018, 12:54 PM
lib/CodeGen/CGBuiltin.cpp
12609

Ok, I can put the return type back in. My rationale for removing it was that for the SIMD truncations, the return type is uniquely determined by the input type, so specifying both in the name is redundant.

aheejin added inline comments.Oct 31 2018, 12:58 PM
lib/CodeGen/CGBuiltin.cpp
12609

I see, but I still think it's easier to readers if they specify return types, in that they don't have to look up SIMD specs when using builtins.

tlively marked 2 inline comments as done.Oct 31 2018, 5:27 PM
tlively updated this revision to Diff 172061.Oct 31 2018, 5:29 PM
  • Restore return types in names
aheejin accepted this revision.Oct 31 2018, 5:39 PM
This revision is now accepted and ready to land.Oct 31 2018, 5:39 PM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.