[AVR] Define the TST instruction as an alias of AND
The 'tst Rd' instruction is equivalent to 'and Rd, Rd'.
gitsvnid: https://llvm.org/svn/llvmproject/llvm/trunk@341276 911773080d340410b5e696231b3b80d8
Dylan McKay
2 years ago
729  729  // TST Rd 
730  730  // Test for zero of minus. 
731  731  // 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 


732  def : InstAlias<"tst\t$rd", (ANDRdRr GPR8:$rd, GPR8:$rd)>;⏎  
741  733  
742  734  //======// 
743  735  // Jump instructions 
2103  2095  def : Pat<(shl i16:$src1, (i8 1)), 
2104  2096  (LSLWRd i16:$src1)>; 
2105  2097  
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 