[PowerPC] multiply-with-overflow might use the CTR register
authorHal Finkel <hfinkel@anl.gov>
Tue, 11 Apr 2017 02:03:17 +0000 (02:03 +0000)
committerHal Finkel <hfinkel@anl.gov>
Tue, 11 Apr 2017 02:03:17 +0000 (02:03 +0000)
commitcef9e52736f9dd886a22696d26a86121d31e6cf2
tree37c0178c723d2650524e77543a24c6e2b7474ec4
parentdcad8bf00eedf7350204d4bf9eeef3a7c13940e6
[PowerPC] multiply-with-overflow might use the CTR register

Check the legality of ISD::[US]MULO to see whether
Intrinsic::[us]mul_with_overflow will legalize into a function call (and, thus,
will use the CTR register).  Fixes PR32485.

Patch by Tim Neumann!

Differential Revision: https://reviews.llvm.org/D31790

llvm-svn: 299910
llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
llvm/test/CodeGen/PowerPC/ctrloop-i128.ll [new file with mode: 0644]