]> granicus.if.org Git - llvm/commitdiff
[Hexagon] Fix decoding conflict between A2_zxtb and A4_ext
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Wed, 8 Feb 2017 16:31:00 +0000 (16:31 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Wed, 8 Feb 2017 16:31:00 +0000 (16:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294472 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Hexagon/HexagonInstrAlias.td
lib/Target/Hexagon/HexagonInstrInfo.td

index 7283d94ee759e931596b4f636fa486af5c8c97d6..b1bcbdef11f14df571457e287fab5c9051757566 100644 (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)>;
index dcb231307dc1cb19b8aaf3f086e7f1e37bce44c1..ece8e3b5cd32056fe508abf2e82871d16d4a3d79 100644 (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)", [] >;