Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm][PPC] Add missing case for 'I' asm memory operands
From https://llvm.org/docs/LangRef.html#asm-template-argument-modifiers: I: Print the letter ‘i’ if the operand is an integer constant, otherwise nothing. Used to print ‘addi’ vs ‘add’ instructions. Differential Revision: https://reviews.llvm.org/D103968 (cherry picked from commit a9e4f91)
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
; 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@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 | ||
} |