blob: 24469cc3717e9d29b55c25312cbc4e6356033a68 [file] [log] [blame]
Evan Chengf19384d2010-05-18 21:31:17 +00001; RUN: llc < %s -mtriple=armv7-apple-darwin | FileCheck %s -check-prefix=ARM
2; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s -check-prefix=THUMB
3; rdar://7998649
4
5%struct.foo = type { i64, i64 }
6
Tim Northoverce6538c2014-05-30 08:59:55 +00007define zeroext i8 @t(%struct.foo* %this, i1 %tst) noreturn optsize {
Evan Chengf19384d2010-05-18 21:31:17 +00008entry:
Stephen Lind24ab202013-07-14 06:24:09 +00009; ARM-LABEL: t:
Tim Northoverce6538c2014-05-30 08:59:55 +000010; ARM-DAG: mov r[[ADDR:[0-9]+]], #8
11; ARM-DAG: mov [[VAL:r[0-9]+]], #0
12; ARM: str [[VAL]], [r[[ADDR]]], r0
Evan Chengf19384d2010-05-18 21:31:17 +000013
Stephen Lind24ab202013-07-14 06:24:09 +000014; THUMB-LABEL: t:
Tim Northoverce6538c2014-05-30 08:59:55 +000015; THUMB-DAG: movs r[[ADDR:[0-9]+]], #8
16; THUMB-DAG: movs [[VAL:r[0-9]+]], #0
17; THUMB-NOT: str {{[a-z0-9]+}}, [{{[a-z0-9]+}}], {{[a-z0-9]+}}
18; THUMB: str [[VAL]], [r[[ADDR]]]
David Blaikie79e6c742015-02-27 19:29:02 +000019 %0 = getelementptr inbounds %struct.foo, %struct.foo* %this, i32 0, i32 1 ; <i64*> [#uses=1]
Chris Lattner1c42a4d2011-04-09 02:31:26 +000020 store i32 0, i32* inttoptr (i32 8 to i32*), align 8
Tim Northoverce6538c2014-05-30 08:59:55 +000021 br i1 %tst, label %bb.nph96, label %bb3
Evan Chengf19384d2010-05-18 21:31:17 +000022
23bb3: ; preds = %entry
David Blaikiea79ac142015-02-27 21:17:42 +000024 %1 = load i64, i64* %0, align 4 ; <i64> [#uses=0]
Tim Northoverce6538c2014-05-30 08:59:55 +000025 ret i8 42
Evan Chengf19384d2010-05-18 21:31:17 +000026
27bb.nph96: ; preds = %entry
Tim Northoverce6538c2014-05-30 08:59:55 +000028 ret i8 3
Evan Chengf19384d2010-05-18 21:31:17 +000029}