1 ; RUN: llc -o - %s -mtriple=arm64-apple-ios -O3 -aarch64-enable-collect-loh | FileCheck %s
2 ; Check that the LOH analysis does not crash when the analysed chained
3 ; contains instructions that are filtered out.
5 ; Before the fix for <rdar://problem/16041712>, these cases were removed
6 ; from the main container. Now, the deterministic container does not allow
7 ; to remove arbitrary values, so we have to live with garbage values.
8 ; <rdar://problem/16041712>
10 %"class.H4ISP::H4ISPDevice" = type { i32 (%"class.H4ISP::H4ISPDevice"*, i32, i8*, i8*)*, i8*, i32*, %"class.H4ISP::H4ISPCameraManager"* }
12 %"class.H4ISP::H4ISPCameraManager" = type opaque
14 declare i32 @_ZN5H4ISP11H4ISPDevice32ISP_SelectBestMIPIFrequencyIndexEjPj(%"class.H4ISP::H4ISPDevice"*)
16 @pH4ISPDevice = hidden global %"class.H4ISP::H4ISPDevice"* null, align 8
20 ; CHECK-NOT: .loh AdrpLdrGotLdr
24 if.then83: ; preds = %if.end81
25 %tmp = load %"class.H4ISP::H4ISPDevice"*, %"class.H4ISP::H4ISPDevice"** @pH4ISPDevice, align 8
26 %call84 = call i32 @_ZN5H4ISP11H4ISPDevice32ISP_SelectBestMIPIFrequencyIndexEjPj(%"class.H4ISP::H4ISPDevice"* %tmp) #19
27 tail call void asm sideeffect "", "~{x19},~{x20},~{x21},~{x22},~{x23},~{x24},~{x25},~{x26},~{x27}"()
28 %tmp2 = load %"class.H4ISP::H4ISPDevice"*, %"class.H4ISP::H4ISPDevice"** @pH4ISPDevice, align 8
29 tail call void asm sideeffect "", "~{x19},~{x20},~{x21},~{x22},~{x23},~{x24},~{x25},~{x26},~{x28}"()
30 %pCameraManager.i268 = getelementptr inbounds %"class.H4ISP::H4ISPDevice", %"class.H4ISP::H4ISPDevice"* %tmp2, i64 0, i32 3
31 %tmp3 = load %"class.H4ISP::H4ISPCameraManager"*, %"class.H4ISP::H4ISPCameraManager"** %pCameraManager.i268, align 8
32 %tobool.i269 = icmp eq %"class.H4ISP::H4ISPCameraManager"* %tmp3, null
33 br i1 %tobool.i269, label %if.then83, label %end