[all-commits] [llvm/llvm-project] 872149: [x86] split memcmp tests for 32/64-bit targets; NFC

RotateRight via All-commits all-commits at lists.llvm.org
Sun Aug 15 11:06:28 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8721490d3859b4d7fff633bdf3c71d888e75727c
      https://github.com/llvm/llvm-project/commit/8721490d3859b4d7fff633bdf3c71d888e75727c
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-08-15 (Sun, 15 Aug 2021)

  Changed paths:
    A llvm/test/CodeGen/X86/memcmp-minsize-x32.ll
    M llvm/test/CodeGen/X86/memcmp-minsize.ll
    A llvm/test/CodeGen/X86/memcmp-more-load-pairs-x32.ll
    M llvm/test/CodeGen/X86/memcmp-more-load-pairs.ll
    A llvm/test/CodeGen/X86/memcmp-optsize-x32.ll
    M llvm/test/CodeGen/X86/memcmp-optsize.ll
    A llvm/test/CodeGen/X86/memcmp-pgso-x32.ll
    M llvm/test/CodeGen/X86/memcmp-pgso.ll
    A llvm/test/CodeGen/X86/memcmp-x32.ll
    M llvm/test/CodeGen/X86/memcmp.ll
    A llvm/test/Transforms/ExpandMemCmp/X86/memcmp-x32.ll
    M llvm/test/Transforms/ExpandMemCmp/X86/memcmp.ll

  Log Message:
  -----------
  [x86] split memcmp tests for 32/64-bit targets; NFC

memcmp is defined as taking a size_t length arg,
so that differs depending on pointer size of the
target.

We casually matched non-compliant function signatures
as memcmp, but that can cause crashing as seen with
PR50850.

If we fix that bug, these tests would no longer be
testing the expected behavior for a 32-bit target,
so I have duplicated all tests and adjusted them
to match the stricter definition of memcmp/bcmp
by changing the length arg to i32 on a 32-bit target.




More information about the All-commits mailing list