File: 2011-03-15-LdStMultipleBug.ll

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2~deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 995,836 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (44 lines) | stat: -rw-r--r-- 1,917 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 -relocation-model=pic -frame-pointer=all -mcpu=cortex-a8 | FileCheck %s

; Do not form Thumb2 ldrd / strd if the offset is not multiple of 4.
; rdar://9133587

%struct.Outer = type { i32, [2 x %"struct.Outer::Inner"] }
%"struct.Outer::Inner" = type { i32, i32, i8, i8 }

@oStruct = external global %struct.Outer, align 4

define void @main(i8 %val8) nounwind {
; CHECK-LABEL: main:
; CHECK-NOT: ldrd
; CHECK: mul
for.body.lr.ph:
  br label %for.body

for.body:                                         ; preds = %_Z14printIsNotZeroi.exit17.for.body_crit_edge, %for.body.lr.ph
  %tmp3 = phi i1 [ false, %for.body.lr.ph ], [ %phitmp27, %_Z14printIsNotZeroi.exit17.for.body_crit_edge ]
  %i.022 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %_Z14printIsNotZeroi.exit17.for.body_crit_edge ]
  %x = getelementptr %struct.Outer, %struct.Outer* @oStruct, i32 0, i32 1, i32 %i.022, i32 0
  %y = getelementptr %struct.Outer, %struct.Outer* @oStruct, i32 0, i32 1, i32 %i.022, i32 1
  %inc = add i32 %i.022, 1
  %tmp8 = load i32, i32* %x, align 4
  %tmp11 = load i32, i32* %y, align 4
  %mul = mul nsw i32 %tmp11, %tmp8
  %tobool.i14 = icmp eq i32 %mul, 0
  br i1 %tobool.i14, label %_Z14printIsNotZeroi.exit17, label %if.then.i16

if.then.i16:                                      ; preds = %_Z14printIsNotZeroi.exit
  ret void

_Z14printIsNotZeroi.exit17:                       ; preds = %_Z14printIsNotZeroi.exit
  br label %_Z14printIsNotZeroi.exit17.for.body_crit_edge

_Z14printIsNotZeroi.exit17.for.body_crit_edge:    ; preds = %_Z14printIsNotZeroi.exit17
  %b.phi.trans.insert = getelementptr %struct.Outer, %struct.Outer* @oStruct, i32 0, i32 1, i32 %inc, i32 3
  %tmp3.pre = load i8, i8* %b.phi.trans.insert, align 1
  %phitmp27 = icmp eq i8 %val8, 0
  br label %for.body

for.end:                                          ; preds = %_Z14printIsNotZeroi.exit17
  ret void
}