[PATCH] D55894: [X86][SSE] Auto upgrade PADDS/PSUBS intrinsics to SADD_SAT/SSUB_SAT generic intrinsics (llvm)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 19 11:17:20 PST 2018


RKSimon created this revision.
RKSimon added reviewers: craig.topper, spatel, nikic, tkrupa.

This auto upgrades the signed SSE saturated math intrinsics to SADD_SAT/SSUB_SAT generic intrinsics.

There are a few items to note:

msan_x86intrinsics.ll - I changed this to another similar x86 intrinsic instead of replacing it with the generic @llvm.sadd.sat.v8i16

x86-adds-subs.ll - Not sure what's best here, the diff is that the generic intrinsics don't constant fold undefs - do we want to add support for that? Should I move this out of the x86 folder and use generic intrinsics?

pic-load-remat.ll - This was using the old sse2 intrinsics, and now use the generics. I don't think it matters but I can change it to another x86 intrinsic if that helps. The test is very old, I'm not sure if its very useful tbh.

Clang counterpart: https://reviews.llvm.org/D55890


Repository:
  rL LLVM

https://reviews.llvm.org/D55894

Files:
  include/llvm/IR/IntrinsicsX86.td
  lib/IR/AutoUpgrade.cpp
  lib/Target/X86/X86IntrinsicsInfo.h
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  test/CodeGen/X86/avx2-intrinsics-fast-isel.ll
  test/CodeGen/X86/avx2-intrinsics-x86-upgrade.ll
  test/CodeGen/X86/avx2-intrinsics-x86.ll
  test/CodeGen/X86/avx512bw-intrinsics-canonical.ll
  test/CodeGen/X86/avx512bw-intrinsics-upgrade.ll
  test/CodeGen/X86/avx512bw-intrinsics.ll
  test/CodeGen/X86/avx512bwvl-intrinsics-canonical.ll
  test/CodeGen/X86/avx512bwvl-intrinsics-upgrade.ll
  test/CodeGen/X86/avx512bwvl-intrinsics.ll
  test/CodeGen/X86/pic-load-remat.ll
  test/CodeGen/X86/sse2-intrinsics-fast-isel.ll
  test/CodeGen/X86/sse2-intrinsics-x86-upgrade.ll
  test/CodeGen/X86/sse2-intrinsics-x86.ll
  test/Instrumentation/MemorySanitizer/msan_x86intrinsics.ll
  test/Transforms/InstCombine/X86/x86-adds-subs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55894.178925.patch
Type: text/x-patch
Size: 208144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181219/5d655ba6/attachment-0001.bin>


More information about the llvm-commits mailing list