[Hexagon] Fix decoding conflict between A2_zxtb and A4_ext

llvm-svn: 294472
This commit is contained in:
Krzysztof Parzyszek 2017-02-08 16:31:00 +00:00
parent 3c82a64636
commit 1df58fc2f9
2 changed files with 3 additions and 1 deletions

View File

@ -436,6 +436,8 @@ def : InstAlias<"$Pd=cmp.ltu($Rs, $Rt)",
// Rd=neg(Rs) is aliased to Rd=sub(#0,Rs)
def : InstAlias<"$Rd = neg($Rs)",
(A2_subri IntRegs:$Rd, 0, IntRegs:$Rs), 0>;
def : InstAlias<"$Rd=zxtb($Rs)",
(A2_andir IntRegs:$Rd, IntRegs:$Rs, 255)>;
def : InstAlias<"m0 = $Rs", (A2_tfrrcr C6, IntRegs:$Rs)>;
def : InstAlias<"$Rd = m0", (A2_tfrcrr IntRegs:$Rd, C6)>;

View File

@ -706,7 +706,7 @@ defm zxth : ALU32_2op_base<"zxth", 0b110>, PredNewRel;
// handle 'mapped' instructions, we need to encode 'zxtb' same as 'and' where
// immediate operand is set to '255'.
let hasNewValue = 1, opNewValue = 0 in
let hasNewValue = 1, opNewValue = 0, isPseudo = 1, isCodeGenOnly = 1 in
class T_ZXTB: ALU32Inst < (outs IntRegs:$Rd), (ins IntRegs:$Rs),
"$Rd=zxtb($Rs)", [] >;