[PowerPC][HTM]Fix $zero is not a GPRC register for builtin_ttest
authorJinsong Ji <jji@us.ibm.com>
Mon, 10 Jun 2019 19:04:14 +0000 (19:04 +0000)
committerJinsong Ji <jji@us.ibm.com>
Mon, 10 Jun 2019 19:04:14 +0000 (19:04 +0000)
commit9c7f93e9146af3222120f21847fbe88e2ecd68ca
tree7f642c37d4ff398896d51ee0653b3e9b54d8e847
parentf8f9d65f85b66d843b4b4c6bb9aeb0ec1f19cbc3
[PowerPC][HTM]Fix $zero is not a GPRC register for builtin_ttest

This was found during HTM cleanup.
Adding a test for builtin_ttest would expose following issue.

*** Bad machine code: Illegal physical register for instruction ***
 - function:    test10
 - basic block: %bb.0 entry (0xf0e57497b58)
 - instruction: %5:crrc0 = TABORTWCI 0, $zero, 0
 - operand 2:   $zero
  $zero is not a GPRC register.
LLVM ERROR: Found 1 machine code errors.

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

llvm-svn: 362974
llvm/lib/Target/PowerPC/PPCInstrHTM.td
llvm/test/CodeGen/PowerPC/htm.ll