1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -run-pass=machine-scheduler -mcpu=sandybridge %s -o - | FileCheck %s
5 ; ModuleID = 'crash.ll'
6 source_filename = "crash.c"
7 target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128"
8 target triple = "i386-unknown-linux-gnu"
10 %struct.in6_addr = type { %struct.anon }
11 %struct.anon = type { i8 }
12 %struct.sk_buff = type { i8 }
13 %struct.ipv6hdr = type { %struct.in6_addr }
15 @csum_ipv6_magic_sum = dso_local local_unnamed_addr global i32 0, align 4
16 @csum_ipv6_magic_saddr = dso_local local_unnamed_addr global %struct.in6_addr zeroinitializer, align 1
17 @csum_ipv6_magic_daddr = dso_local local_unnamed_addr global i32 0, align 4
18 @csum_ipv6_magic_proto = dso_local local_unnamed_addr global i32 0, align 4
19 @synproxy_send_tcp_ipv6_nskb = dso_local local_unnamed_addr global ptr null, align 4
20 @synproxy_send_tcp_ipv6_fl6 = dso_local local_unnamed_addr global %struct.in6_addr zeroinitializer, align 1
22 ; Function Attrs: nounwind uwtable
23 define dso_local void @synproxy_send_tcp_ipv6(i32 inreg %skb.coerce, ptr inreg nocapture noundef readonly %niph) local_unnamed_addr #0 {
25 %0 = load i8, ptr @csum_ipv6_magic_saddr, align 1
26 %1 = load i32, ptr @csum_ipv6_magic_daddr, align 4, !tbaa !5
27 %2 = load i32, ptr @csum_ipv6_magic_proto, align 4, !tbaa !5
28 %3 = tail call i32 asm "", "=&r,r,r,r,r,~{dirflag},~{fpsr},~{flags}"(i8 %0, i32 %1, i32 0, i32 %2) #2, !srcloc !9
29 store i32 %3, ptr @csum_ipv6_magic_sum, align 4, !tbaa !5
30 %4 = load ptr, ptr @synproxy_send_tcp_ipv6_nskb, align 4, !tbaa !10
31 %bf.load = load i8, ptr %4, align 1
32 %bf.set = or i8 %bf.load, 3
33 store i8 %bf.set, ptr %4, align 1
34 %5 = load i8, ptr %niph, align 1, !tbaa !12
35 store i8 %5, ptr @synproxy_send_tcp_ipv6_fl6, align 1, !tbaa !12
36 %skb.coerce1.sroa.0.0.insert.ext = and i32 %skb.coerce, 255
37 tail call void @fl6nthsecurity_skb_classify_flow(i32 inreg %skb.coerce1.sroa.0.0.insert.ext) #3
41 declare dso_local void @fl6nthsecurity_skb_classify_flow(i32 inreg) local_unnamed_addr #1
43 attributes #0 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="pentium4" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
44 attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="pentium4" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
45 attributes #2 = { nounwind readnone }
46 attributes #3 = { nounwind }
48 !llvm.module.flags = !{!0, !1, !2, !3}
50 !0 = !{i32 1, !"NumRegisterParameters", i32 3}
51 !1 = !{i32 1, !"wchar_size", i32 4}
52 !2 = !{i32 7, !"uwtable", i32 2}
53 !3 = !{i32 7, !"frame-pointer", i32 2}
55 !6 = !{!"int", !7, i64 0}
56 !7 = !{!"omnipotent char", !8, i64 0}
57 !8 = !{!"Simple C/C++ TBAA"}
59 !10 = !{!11, !11, i64 0}
60 !11 = !{!"any pointer", !7, i64 0}
61 !12 = !{!7, !7, i64 0}
65 name: synproxy_send_tcp_ipv6
67 exposesReturnsTwice: false
69 regBankSelected: false
72 tracksRegLiveness: true
74 failsVerification: false
75 tracksDebugUserValues: false
77 - { id: 0, class: gr32_abcd, preferred-register: '' }
78 - { id: 1, class: gr32, preferred-register: '' }
79 - { id: 2, class: gr32, preferred-register: '' }
80 - { id: 3, class: gr8, preferred-register: '' }
81 - { id: 4, class: gr32, preferred-register: '' }
82 - { id: 5, class: gr32, preferred-register: '' }
83 - { id: 6, class: gr32, preferred-register: '' }
84 - { id: 7, class: gr32, preferred-register: '' }
85 - { id: 8, class: gr8, preferred-register: '' }
86 - { id: 9, class: gr8, preferred-register: '' }
87 - { id: 10, class: gr32, preferred-register: '' }
89 - { reg: '$eax', virtual-reg: '%0' }
90 - { reg: '$edx', virtual-reg: '%1' }
92 isFrameAddressTaken: false
93 isReturnAddressTaken: false
102 maxCallFrameSize: 4294967295
103 cvBytesOfCalleeSavedRegisters: 0
104 hasOpaqueSPAdjustment: false
106 hasMustTailInVarArgFunc: false
114 debugValueSubstitutions: []
116 machineFunctionInfo: {}
121 ; CHECK-LABEL: name: synproxy_send_tcp_ipv6
122 ; CHECK: liveins: $eax, $edx
124 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gr32 = COPY $edx
125 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gr32_abcd = COPY $eax
126 ; CHECK-NEXT: [[MOV8rm:%[0-9]+]]:gr8 = MOV8rm $noreg, 1, $noreg, @csum_ipv6_magic_saddr, $noreg :: (dereferenceable load (s8) from @csum_ipv6_magic_saddr)
127 ; CHECK-NEXT: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm $noreg, 1, $noreg, @csum_ipv6_magic_daddr, $noreg :: (dereferenceable load (s32) from @csum_ipv6_magic_daddr, !tbaa !4)
128 ; CHECK-NEXT: [[MOV32rm1:%[0-9]+]]:gr32 = MOV32rm $noreg, 1, $noreg, @csum_ipv6_magic_proto, $noreg :: (dereferenceable load (s32) from @csum_ipv6_magic_proto, !tbaa !4)
129 ; CHECK-NEXT: [[MOV32r0_:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
130 ; CHECK-NEXT: INLINEASM &"", 0 /* attdialect */, 2359307 /* regdef-ec:GR32 */, def early-clobber %2, 65545 /* reguse:GR8 */, [[MOV8rm]], 2359305 /* reguse:GR32 */, [[MOV32rm]], 2359305 /* reguse:GR32 */, [[MOV32r0_]], 2359305 /* reguse:GR32 */, [[MOV32rm1]], 12 /* clobber */, implicit-def dead early-clobber $df, 12 /* clobber */, implicit-def early-clobber $fpsw, 12 /* clobber */, implicit-def dead early-clobber $eflags, !8
131 ; CHECK-NEXT: MOV32mr $noreg, 1, $noreg, @csum_ipv6_magic_sum, $noreg, %2 :: (store (s32) into @csum_ipv6_magic_sum, !tbaa !4)
132 ; CHECK-NEXT: [[MOV32rm2:%[0-9]+]]:gr32 = MOV32rm $noreg, 1, $noreg, @synproxy_send_tcp_ipv6_nskb, $noreg :: (dereferenceable load (s32) from @synproxy_send_tcp_ipv6_nskb, !tbaa !9)
133 ; CHECK-NEXT: OR8mi [[MOV32rm2]], 1, $noreg, 0, $noreg, 3, implicit-def dead $eflags :: (store (s8) into %ir.4), (load (s8) from %ir.4)
134 ; CHECK-NEXT: [[MOV8rm1:%[0-9]+]]:gr8 = MOV8rm [[COPY]], 1, $noreg, 0, $noreg :: (load (s8) from %ir.niph, !tbaa !11)
135 ; CHECK-NEXT: MOV8mr $noreg, 1, $noreg, @synproxy_send_tcp_ipv6_fl6, $noreg, [[MOV8rm1]] :: (store (s8) into @synproxy_send_tcp_ipv6_fl6, !tbaa !11)
136 ; CHECK-NEXT: [[MOVZX32rr8_:%[0-9]+]]:gr32 = MOVZX32rr8 [[COPY1]].sub_8bit
137 ; CHECK-NEXT: $eax = COPY [[MOVZX32rr8_]]
138 ; CHECK-NEXT: TCRETURNdi @fl6nthsecurity_skb_classify_flow, 0, csr_32, implicit $esp, implicit $ssp, implicit $eax
140 %0:gr32_abcd = COPY $eax
141 %3:gr8 = MOV8rm $noreg, 1, $noreg, @csum_ipv6_magic_saddr, $noreg :: (dereferenceable load (s8) from @csum_ipv6_magic_saddr)
142 %4:gr32 = MOV32rm $noreg, 1, $noreg, @csum_ipv6_magic_daddr, $noreg :: (dereferenceable load (s32) from @csum_ipv6_magic_daddr, !tbaa !5)
143 %6:gr32 = MOV32rm $noreg, 1, $noreg, @csum_ipv6_magic_proto, $noreg :: (dereferenceable load (s32) from @csum_ipv6_magic_proto, !tbaa !5)
144 %5:gr32 = MOV32r0 implicit-def dead $eflags
145 INLINEASM &"", 0 /* attdialect */, 2359307 /* regdef-ec:GR32 */, def early-clobber %2, 65545 /* reguse:GR8 */, %3, 2359305 /* reguse:GR32 */, %4, 2359305 /* reguse:GR32 */, %5, 2359305 /* reguse:GR32 */, %6, 12 /* clobber */, implicit-def dead early-clobber $df, 12 /* clobber */, implicit-def early-clobber $fpsw, 12 /* clobber */, implicit-def dead early-clobber $eflags, !9
146 MOV32mr $noreg, 1, $noreg, @csum_ipv6_magic_sum, $noreg, %2 :: (store (s32) into @csum_ipv6_magic_sum, !tbaa !5)
147 %7:gr32 = MOV32rm $noreg, 1, $noreg, @synproxy_send_tcp_ipv6_nskb, $noreg :: (dereferenceable load (s32) from @synproxy_send_tcp_ipv6_nskb, !tbaa !10)
148 OR8mi %7, 1, $noreg, 0, $noreg, 3, implicit-def dead $eflags :: (store (s8) into %ir.4), (load (s8) from %ir.4)
149 %8:gr8 = MOV8rm %1, 1, $noreg, 0, $noreg :: (load (s8) from %ir.niph, !tbaa !12)
150 MOV8mr $noreg, 1, $noreg, @synproxy_send_tcp_ipv6_fl6, $noreg, %8 :: (store (s8) into @synproxy_send_tcp_ipv6_fl6, !tbaa !12)
151 %10:gr32 = MOVZX32rr8 %0.sub_8bit
153 TCRETURNdi @fl6nthsecurity_skb_classify_flow, 0, csr_32, implicit $esp, implicit $ssp, implicit $eax