mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
8fc62308ad
Summary: This patch add the InstAlias definitions for below instructions. ADDI ADDIS ADDI8 ADDIS8 RLWINM8 ISEL ISEL8 OR OR_rec ORI ORI8 XORI8 CNTLZW8 CNTLZW8_rec TEND TSR RFEBB NOR NOR_rec MTCRF SUBF SUBF_rec SUBFC SUBFC_rec RLDICL_32_64 TW Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D77559
31 lines
1.1 KiB
LLVM
31 lines
1.1 KiB
LLVM
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu -break-anti-dependencies=none | FileCheck %s
|
|
; ModuleID = 'hh.c'
|
|
;;;;; target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128-n32"
|
|
target triple = "powerpc-unknown-linux-gnu.6"
|
|
|
|
define void @foo() nounwind {
|
|
entry:
|
|
; Note that part of what is being checked here is proper register reuse.
|
|
; CHECK: mfcr [[T1:[0-9]+]]
|
|
; CHECK-DAG: sub 0, 1, 0
|
|
; CHECK-DAG: ori [[T2:[0-9]+]], [[T2]], 34492
|
|
; CHECK-DAG: stwx [[T1]], 1, [[T2]]
|
|
; CHECK-DAG: addi 3, 1, 28
|
|
; CHECK: bl bar
|
|
%x = alloca [100000 x i8] ; <[100000 x i8]*> [#uses=1]
|
|
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
|
|
%x1 = bitcast [100000 x i8]* %x to i8* ; <i8*> [#uses=1]
|
|
call void @bar(i8* %x1) nounwind
|
|
call void asm sideeffect "", "~{cr2},~{cr3}"() nounwind
|
|
br label %return
|
|
|
|
return: ; preds = %entry
|
|
; CHECK: ori [[T2]], [[T2]], 34492
|
|
; CHECK: lwzx [[T1]], 1, [[T2]]
|
|
; CHECK: mtcrf 32, [[T1]]
|
|
; CHECK: mtcrf 16, [[T1]]
|
|
ret void
|
|
}
|
|
|
|
declare void @bar(i8*)
|