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

Russell Gallop via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 4 10:39:27 PDT 2019


russell.gallop added a comment.

> I'll have a look and see if there is a reason why these don't fail in the same way (which would make the test fail in it's current form).

These do not have the "I" prefix (//  I   -> Required to constant fold to an integer constant expression.) in BuiltinsX86.def which is probably why they don't error.

Checking against the LLVM side, there is a comment in IntrinsicsX86.td:

  // Oddly these don't require an immediate due to a gcc compatibility issue.
  def int_x86_mmx_pslli_w : GCCBuiltin<"__builtin_ia32_psllwi">,
              Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty,
                         llvm_i32_ty], [IntrNoMem]>;

That comment was added recently by Craig in r355993. So it looks like they should work with either for compatibility.


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