llvm-project/llvm/test/CodeGen/PowerPC/fast-isel-shifter.ll
Qiu Chaofan d0f9553ef5 [PowerPC] Enable fast-isel on AIX 64 subtarget
This patch basically enables fast-isel for AIX 64-bit subtarget
(previously enabled only for ELF 64). The initial motivation is to
introduce branch folding to AIX generated code for correct debug
behavior. I also saw some compiling time improvement in a few LLVM
test-suite benchmarks. (toast, dbms, cjpeg, burg, etc.)

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D98844
2021-09-03 11:33:45 +08:00

52 lines
1.0 KiB
LLVM

; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s --check-prefix=PPC64
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-ibm-aix-xcoff -mcpu=pwr7 | FileCheck %s --check-prefix=PPC64
define i32 @shl() nounwind {
entry:
; PPC64: shl
; PPC64: slw
%shl = shl i32 -1, 2
ret i32 %shl
}
define i32 @shl_reg(i32 %src1, i32 %src2) nounwind {
entry:
; PPC64: shl_reg
; PPC64: slw
%shl = shl i32 %src1, %src2
ret i32 %shl
}
define i32 @lshr() nounwind {
entry:
; PPC64: lshr
; PPC64: srw
%lshr = lshr i32 -1, 2
ret i32 %lshr
}
define i32 @lshr_reg(i32 %src1, i32 %src2) nounwind {
entry:
; PPC64: lshr_reg
; PPC64: srw
%lshr = lshr i32 %src1, %src2
ret i32 %lshr
}
define i32 @ashr() nounwind {
entry:
; PPC64: ashr
; PPC64: srawi
%ashr = ashr i32 -1, 2
ret i32 %ashr
}
define i32 @ashr_reg(i32 %src1, i32 %src2) nounwind {
entry:
; PPC64: ashr_reg
; PPC64: sraw
%ashr = ashr i32 %src1, %src2
ret i32 %ashr
}