mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
d3b1f6d3e0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36091 91177308-0d34-0410-b5e6-96231b3b80d8
17 lines
466 B
LLVM
17 lines
466 B
LLVM
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
|
|
; RUN: grep shld | wc -l | grep 1
|
|
;
|
|
; Check that the isel does not fold the shld, which already folds a load
|
|
; and has two uses, into a store.
|
|
%A = external global uint
|
|
|
|
uint %test5(uint %B, ubyte %C) {
|
|
%tmp.1 = load uint *%A;
|
|
%tmp.2 = shl uint %tmp.1, ubyte %C
|
|
%tmp.3 = sub ubyte 32, %C
|
|
%tmp.4 = shr uint %B, ubyte %tmp.3
|
|
%tmp.5 = or uint %tmp.4, %tmp.2
|
|
store uint %tmp.5, uint* %A
|
|
ret uint %tmp.5
|
|
}
|