summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Mips/swzero.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/Mips/swzero.ll')
-rw-r--r--test/CodeGen/Mips/swzero.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/swzero.ll b/test/CodeGen/Mips/swzero.ll
new file mode 100644
index 0000000..da1e036
--- /dev/null
+++ b/test/CodeGen/Mips/swzero.ll
@@ -0,0 +1,19 @@
+; 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
+}
+
OpenPOWER on IntegriCloud