mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
839b909653
There are certain PPC instructions into which we can fold a zero immediate operand. We can detect such cases by looking at the register class required by the using operand (so long as it is not otherwise constrained). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178961 91177308-0d34-0410-b5e6-96231b3b80d8
15 lines
434 B
LLVM
15 lines
434 B
LLVM
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s
|
|
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
|
|
target triple = "powerpc64-unknown-linux-gnu"
|
|
|
|
define i32 @test1(i1 %a, i32 %c) nounwind {
|
|
%x = select i1 %a, i32 %c, i32 0
|
|
ret i32 %x
|
|
|
|
; CHECK: @test1
|
|
; CHECK-NOT: li {{[0-9]+}}, 0
|
|
; CHECK: isel 3, 0,
|
|
; CHECK: blr
|
|
}
|
|
|