OSDN Git Service

[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)
commit93d6b17c1cccece6e9a0b8e4705dd47e7c60e1f7
tree705a0818f707c49ac24b7418b10d7f8d2402afe9
parent7cc02fd898f766339a2309a18d49ea8a43b0066c
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362974 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCInstrHTM.td
test/CodeGen/PowerPC/htm.ll