[PATCH] D103968: [llvm][PowerPC] Add missing support for 'I' asm template argument modifiers

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 10 03:09:40 PDT 2021


nemanjai accepted this revision.
nemanjai added a comment.
This revision is now accepted and ready to land.

LGTM with a simplification to the test case.



================
Comment at: llvm/test/CodeGen/PowerPC/asm-template-I.ll:1
+; https://bugs.llvm.org/show_bug.cgi?id=50608
+; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64le--
----------------
We can simplify this test case and add checks rather than just expecting a successful execution. The entire test can be simplified to:
```
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-- | FileCheck %s
; https://bugs.llvm.org/show_bug.cgi?id=50608

define dso_local signext i32 @main(i32 signext %argc, i8** %argv) {
; CHECK-LABEL: main:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    stw 3, -4(1)
; CHECK-NEXT:    li 3, 0
; CHECK-NEXT:    addi 4, 1, -4
; CHECK-NEXT:    #APP
; CHECK-NEXT:    .ascii "-1 at 0(4)"
; CHECK-NEXT:    .byte 0
; CHECK-NEXT:    #NO_APP
; CHECK-NEXT:    blr
entry:
  call void asm sideeffect " .asciz \22${0:n}@${1:I}$1\22 ", "n,nZr"(i32 1, i32 %argc)
  ret i32 0
}
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103968/new/

https://reviews.llvm.org/D103968



More information about the llvm-commits mailing list