[PowerPC] FastISel can't handle i1 return values when using CR bits
authorHal Finkel <hfinkel@anl.gov>
Wed, 1 Apr 2015 00:40:48 +0000 (00:40 +0000)
committerHal Finkel <hfinkel@anl.gov>
Wed, 1 Apr 2015 00:40:48 +0000 (00:40 +0000)
commit54ab6ce385acd8bcfdb235fc171dea255b490467
tree9e754449b1afc3623e2864d5f8fd950a98e33608
parent06c06df4de60e8706613d6743501e0a33d57f7c0
[PowerPC] FastISel can't handle i1 return values when using CR bits

Under normal circumstances, use of CR bits is disabled when running at -O0, but
it is enabled by default otherwise, and if you have optnone functions, they'll
still generally be generated with crbits turned on (because nothing else turns
them off). FastISel can't handle most things dealing with i1 values when using
CR bits, and checks for that, but was not checking the return type on
functions; we can't fast-isel function calls with i1 return values either when
using CR bits for boolean values.

Fixes PR22664.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233775 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCFastISel.cpp
test/CodeGen/PowerPC/optnone-crbits-i1-ret.ll [new file with mode: 0644]