[PATCH] D152087: [AVR] Supplement a test of the pseudo instruction RORBRd

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 3 20:26:27 PDT 2023


benshi001 created this revision.
benshi001 added reviewers: aykevl, Patryk27, jacquesguan, Miss_Grape.
Herald added subscribers: Jim, dylanmckay.
Herald added a project: All.
benshi001 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152087

Files:
  llvm/test/CodeGen/AVR/pseudo/RORBrd.mir


Index: llvm/test/CodeGen/AVR/pseudo/RORBrd.mir
===================================================================
--- /dev/null
+++ llvm/test/CodeGen/AVR/pseudo/RORBrd.mir
@@ -0,0 +1,25 @@
+# RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - | FileCheck %s
+
+# This test checks the expansion of the 8-bit RORB (rotate) pseudo instruction.
+
+--- |
+  target triple = "avr--"
+  define void @test_rorbrd() {
+  entry:
+    ret void
+  }
+...
+
+---
+name:            test_rorbrd
+body: |
+  bb.0.entry:
+    liveins: $r14
+
+    ; CHECK-LABEL: test_rorbrd
+    ; CHECK:       BST $r14, 0, implicit-def $sreg 
+    ; CHECK:       $r14 = RORRd $r14, implicit-def $sreg, implicit $sreg 
+    ; CHECK:       $r14 = BLD $r14, 7, implicit $sreg 
+
+    $r14 = RORBRd $r14, implicit-def $sreg
+...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152087.528176.patch
Type: text/x-patch
Size: 791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230604/cc50edcc/attachment.bin>


More information about the llvm-commits mailing list