mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
469bbdb597
and a combine pattern to use it for setting a bit-field to a constant value. More to come for non-constant stores. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108570 91177308-0d34-0410-b5e6-96231b3b80d8
18 lines
579 B
LLVM
18 lines
579 B
LLVM
; RUN: llc -march=thumb -mattr=+v6t2 < %s | FileCheck %s
|
|
|
|
%struct.F = type { [3 x i8], i8 }
|
|
|
|
@X = common global %struct.F zeroinitializer, align 4 ; <%struct.F*> [#uses=1]
|
|
|
|
define void @f1([1 x i32] %f.coerce0) nounwind {
|
|
entry:
|
|
; CHECK: f1
|
|
; CHECK: movs r2, #10
|
|
; CHECK: bfi r1, r2, #22, #4
|
|
%0 = load i32* bitcast (%struct.F* @X to i32*), align 4 ; <i32> [#uses=1]
|
|
%1 = and i32 %0, -62914561 ; <i32> [#uses=1]
|
|
%2 = or i32 %1, 41943040 ; <i32> [#uses=1]
|
|
store i32 %2, i32* bitcast (%struct.F* @X to i32*), align 4
|
|
ret void
|
|
}
|