1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 08:23:21 +01:00
llvm-mirror/test/CodeGen/Mips/swzero.ll
Akira Hatanaka 4ab17eaca0 Fix bug in zero-store peephole pattern reported in pr11615.
The patch and test case were originally written by Mans Rullgard.

llvm-svn: 147024
2011-12-21 00:31:10 +00:00

20 lines
405 B
LLVM

; RUN: llc -march=mipsel < %s | FileCheck %s
%struct.unaligned = type <{ i32 }>
define void @zero_u(%struct.unaligned* nocapture %p) nounwind {
entry:
; CHECK: usw $zero
%x = getelementptr inbounds %struct.unaligned* %p, i32 0, i32 0
store i32 0, i32* %x, align 1
ret void
}
define void @zero_a(i32* nocapture %p) nounwind {
entry:
; CHECK: sw $zero
store i32 0, i32* %p, align 4
ret void
}