brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · f989038 Raw
81 lines · plain
1; RUN: llc -mtriple=arm-eabi -pre-RA-sched=source -mattr=+strict-align %s -o - \2; RUN:	| FileCheck %s -check-prefix=EXPANDED3 4; RUN: llc -mtriple=armv6-apple-darwin -mcpu=cortex-a8 -mattr=-neon,+strict-align -pre-RA-sched=source %s -o - \5; RUN:	| FileCheck %s -check-prefix=EXPANDED6 7; RUN: llc -mtriple=armv6-apple-darwin -mcpu=cortex-a8 %s -o - \8; RUN:	| FileCheck %s -check-prefix=UNALIGNED9 10; rdar://711372511; rdar://1209102912 13define void @t(ptr nocapture %a, ptr nocapture %b) nounwind {14entry:15; EXPANDED-LABEL: t:16; EXPANDED-DAG: ldrb [[R2:r[0-9]+]]17; EXPANDED-DAG: ldrb [[R3:r[0-9]+]]18; EXPANDED-DAG: ldrb [[R12:r[0-9]+]]19; EXPANDED-DAG: ldrb [[R1:r[0-9]+]]20; EXPANDED-DAG: strb [[R1]]21; EXPANDED-DAG: strb [[R12]]22; EXPANDED-DAG: strb [[R3]]23; EXPANDED-DAG: strb [[R2]]24 25; UNALIGNED-LABEL: t:26; UNALIGNED: ldr r127; UNALIGNED: str r128 29  %tmp.i = load i32, ptr %b, align 1           ; <i32> [#uses=1]30  store i32 %tmp.i, ptr %a, align 131  ret void32}33 34define void @hword(ptr %a, ptr %b) nounwind {35entry:36; EXPANDED-LABEL: hword:37; EXPANDED-NOT: vld138; EXPANDED: ldrh39; EXPANDED-NOT: str140; EXPANDED: strh41 42; UNALIGNED-LABEL: hword:43; UNALIGNED: vld1.1644; UNALIGNED: vst1.1645  %tmp = load double, ptr %a, align 246  store double %tmp, ptr %b, align 247  ret void48}49 50define void @byte(ptr %a, ptr %b) nounwind {51entry:52; EXPANDED-LABEL: byte:53; EXPANDED-NOT: vld154; EXPANDED: ldrb55; EXPANDED-NOT: str156; EXPANDED: strb57 58; UNALIGNED-LABEL: byte:59; UNALIGNED: vld1.860; UNALIGNED: vst1.861  %tmp = load double, ptr %a, align 162  store double %tmp, ptr %b, align 163  ret void64}65 66define void @byte_word_ops(ptr %a, ptr %b) nounwind {67entry:68; EXPANDED-LABEL: byte_word_ops:69; EXPANDED: ldrb70; EXPANDED: strb71 72; UNALIGNED-LABEL: byte_word_ops:73; UNALIGNED-NOT: ldrb74; UNALIGNED: ldr75; UNALIGNED-NOT: strb76; UNALIGNED: str77  %tmp = load i32, ptr %a, align 178  store i32 %tmp, ptr %b, align 179  ret void80}81