OSDN Git Service

[CGP] adjust target constraints for forming uaddo
authorSanjay Patel <spatel@rotateright.com>
Sun, 3 Feb 2019 17:53:09 +0000 (17:53 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sun, 3 Feb 2019 17:53:09 +0000 (17:53 +0000)
commit25df0ed1c502d2044da0f796187e183f15514815
tree64df3c76edab2d498809d170113cb031901e05b9
parent39a2370f4eb11e377373be8b87bd41a34761b24a
[CGP] adjust target constraints for forming uaddo

There are 2 changes visible here:
1. There's no reason to limit this transform based on number
   of condition registers. That diff allows PPC to produce
   slightly better (dot-instructions should be generally good)
   code.
   Note: someone that cares about PPC codegen might want to
   look closer at that output because it seems like we could
   still improve this.

2. We (probably?) should not bother trying to form uaddo (or
   other overflow ops) when there's no target support for such
   an op. This goes beyond checking whether the op is expanded
   because both PPC and AArch64 show better codegen for standard
   types regardless of whether the op is legal/custom.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353001 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenPrepare.cpp
test/CodeGen/PowerPC/sat-add.ll
test/CodeGen/X86/codegen-prepare-uaddo.ll
test/Transforms/CodeGenPrepare/X86/overflow-intrinsics.ll