]> granicus.if.org Git - llvm/commit
[PPC] In PPCBoolRetToInt change the bool value to i64 if the target is ppc64
authorGuozhi Wei <carrot@google.com>
Tue, 28 Mar 2017 22:55:01 +0000 (22:55 +0000)
committerGuozhi Wei <carrot@google.com>
Tue, 28 Mar 2017 22:55:01 +0000 (22:55 +0000)
commit522a572e3cc75192d2c5fe94e4fd674d94c4a4a9
treed33bb549c726fa23136f71d5165e0b34b1d8b95e
parent3a0175382aff74f6bbdb4cba5b649b7cfb18953e
[PPC] In PPCBoolRetToInt change the bool value to i64 if the target is ppc64

In PPCBoolRetToInt bool value is changed to i32 type. On ppc64 it may introduce an extra zero extension for the return value. This patch changes the integer type to i64 to avoid the zero extension on ppc64.

This patch fixed PR32442.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298955 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPC.h
lib/Target/PowerPC/PPCBoolRetToInt.cpp
lib/Target/PowerPC/PPCTargetMachine.cpp
test/CodeGen/PowerPC/BoolRetToIntTest-2.ll [new file with mode: 0644]
test/CodeGen/PowerPC/BoolRetToIntTest.ll