llvm.org GIT mirror llvm / dfd17d0
[AVR] Define the TST instruction as an alias of AND The 'tst Rd' instruction is equivalent to 'and Rd, Rd'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341276 91177308-0d34-0410-b5e6-96231b3b80d8 Dylan McKay 2 years ago
1 changed file(s) with 6 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
729729 // TST Rd
730730 // Test for zero of minus.
731731 // This operation is identical to a `Rd AND Rd`.
732 //def : InstAlias<"tst\t$rd", (ANDRdRr GPR8:$rd, GPR8:$rd), 1>;
733
734 let Defs = [SREG] in
735 def TSTRd : FTST<0b0010,
736 0b00,
737 (outs),
738 (ins GPR8:$rd),
739 "tst\t$rd",
740 [(AVRtst i8:$rd)]>;
732 def : InstAlias<"tst\t$rd", (ANDRdRr GPR8:$rd, GPR8:$rd)>;
741733
742734 //===----------------------------------------------------------------------===//
743735 // Jump instructions
21032095 def : Pat<(shl i16:$src1, (i8 1)),
21042096 (LSLWRd i16:$src1)>;
21052097
2098 // Lowering of 'tst' node to 'TST' instruction.
2099 // TST is an alias of AND Rd, Rd.
2100 def : Pat<(AVRtst i8:$rd),
2101 (ANDRdRr $rd, $rd)>;
2102