diff options
| author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-09-25 11:11:53 +0000 |
|---|---|---|
| committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-09-25 11:11:53 +0000 |
| commit | 652784e29a4daeb54e816d313cc199dcf0cb7f54 (patch) | |
| tree | c57c52e075f551a8b68c2deb75fa0bfe79b24ee0 /llvm/lib/Target/SystemZ/SystemZPatterns.td | |
| parent | 0c58bc64a4bd40561ae044527c4e1f8190f435f7 (diff) | |
| download | bcm5719-llvm-652784e29a4daeb54e816d313cc199dcf0cb7f54.tar.gz bcm5719-llvm-652784e29a4daeb54e816d313cc199dcf0cb7f54.zip | |
[SystemZ] Define the GR64 low-word logic instructions as pseudo aliases.
Another patch to avoid duplication of encoding information. Things like
NILF, NILL and NILH are used as both 32-bit and 64-bit instructions.
Here the 64-bit versions are defined as aliases of the 32-bit ones.
llvm-svn: 191369
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZPatterns.td')
| -rw-r--r-- | llvm/lib/Target/SystemZ/SystemZPatterns.td | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZPatterns.td b/llvm/lib/Target/SystemZ/SystemZPatterns.td index a1344a3a8e9..203247c5026 100644 --- a/llvm/lib/Target/SystemZ/SystemZPatterns.td +++ b/llvm/lib/Target/SystemZ/SystemZPatterns.td @@ -112,6 +112,14 @@ multiclass CondStores64<Instruction insn, Instruction insninv, uimm8zx4:$valid, uimm8zx4:$cc)>; } +// INSN performs a comparison between a 32-bit register and a constant. +// Record that it is equivalent to comparing the low word of a GR64 with IMM. +class CompareGR64RI<Instruction insn, SDPatternOperator compare, + Immediate imm> + : Pat<(compare GR64:$R1, imm:$I2), + (insn (EXTRACT_SUBREG GR64:$R1, subreg_32bit), + (imm.OperandTransform imm:$I2))>; + // Try to use MVC instruction INSN for a load of type LOAD followed by a store // of the same size. VT is the type of the intermediate (legalized) value and // LENGTH is the number of bytes loaded by LOAD. |

