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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 19 13:15:07 PST 2018


craig.topper added inline comments.


================
Comment at: test/Transforms/InstCombine/X86/x86-adds-subs.ll:22
 ; CHECK-LABEL: @sse2_adds_b_constant_overflow(
 ; CHECK-NEXT:    ret <16 x i8> <i8 2, i8 4, i8 6, i8 8, i8 10, i8 12, i8 14, i8 16, i8 18, i8 20, i8 127, i8 24, i8 26, i8 28, i8 30, i8 127>
 ;
----------------
RKSimon wrote:
> craig.topper wrote:
> > Probably should move this out to generic. Feels weird to test upgraded intrinsics.
> OK - will do this as a pre-commit if that's OK? What about the UNDEF handling, just raise a bug?
Thats fine with me. Raise a bug for undef handling. It look like for scalars we fold undef input to -1 if I'm reading the code in InstSimplify correctly. That looks to be different than what we were previously doing for the intrinsics.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55894





More information about the llvm-commits mailing list