[PATCH] D72742: Don't assume promotable integers are zero/sign-extended already in x86-64 ABI.

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 07:54:46 PST 2020


rjmccall added a comment.

In D72742#1854594 <https://reviews.llvm.org/D72742#1854594>, @emilio wrote:

> Could anyone update me with how do they want me to proceed here? Is fixing the coercions enough to allow this to land? Do I need to make it target-specific?


It needs to be target-specific.

> If so, which targets should keep the current behavior?

At least Darwin and PS4, maybe some others.  BSD?

> Another slightly more backwards-compatible alternative (though hacky, arguably) is to just not use the zext for optimization purposes in the backend. This would be simpler and should keep clang always sign-extending on the caller too, for now. We could then after a while, switch to this approach. D71178 <https://reviews.llvm.org/D71178> contains such a patch, for comparison.

It wouldn't be unreasonable to have a way to request this behavior, but I'm not sure about switching to it for all `zext` / `sext`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72742/new/

https://reviews.llvm.org/D72742





More information about the llvm-commits mailing list