[PATCH] D62850: [X86] Fix builtins-x86.c test where it wasn't using immediates. NFC

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 4 07:07:03 PDT 2019


lebedev.ri added a comment.

In D62850#1529081 <https://reviews.llvm.org/D62850#1529081>, @russell.gallop wrote:

> > .. or?
>
> I'm not sure what you mean.
>
> > Is this fixing a current test failure?
>
> No. The test is not failing, but it is not doing what was intended as these builtins are for generating the immediate form of the corresponding instruction and they were generating actually generating a register form.


Then the test should be failing? Or is the current form also legal?

> This test doesn't check the instructions generated are correct, but fixing that is a bigger task...



In D62850#1529197 <https://reviews.llvm.org/D62850#1529197>, @russell.gallop wrote:

> > Is the compiler missing a check that these parameters are immediates?
>
> I don't think that there can be a check, or this would have been noticed.
>
> I don't know whether this is possible and/or desirable. Do users use one version of the builtin and want the compiler to decide whether to use the immediate form?


See https://llvm.org/docs/LangRef.html#parameter-attributes `immarg`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62850





More information about the cfe-commits mailing list