1 ; RUN: opt < %s -instcombine -S | \
2 ; RUN: grep "call float bitcast" | count 1
3 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
4 %struct.NSObject = type { %struct.objc_class* }
5 %struct.NSArray = type { %struct.NSObject }
6 %struct.objc_class = type opaque
7 %struct.objc_selector = type opaque
9 @"\01L_OBJC_METH_VAR_NAME_112" = internal global [15 x i8] c"whiteComponent\00", section "__TEXT,__cstring,cstring_literals"
10 @"\01L_OBJC_SELECTOR_REFERENCES_81" = internal global %struct.objc_selector* bitcast ([15 x i8]* @"\01L_OBJC_METH_VAR_NAME_112" to %struct.objc_selector*), section "__OBJC,__message_refs,literal_pointers,no_dead_strip"
12 define void @bork() nounwind {
14 %color = alloca %struct.NSArray*
15 %color.466 = alloca %struct.NSObject*
16 %tmp103 = load %struct.NSArray*, %struct.NSArray** %color, align 4
17 %tmp103104 = getelementptr %struct.NSArray, %struct.NSArray* %tmp103, i32 0, i32 0
18 store %struct.NSObject* %tmp103104, %struct.NSObject** %color.466, align 4
19 %tmp105 = load %struct.objc_selector*, %struct.objc_selector** @"\01L_OBJC_SELECTOR_REFERENCES_81", align 4
20 %tmp106 = load %struct.NSObject*, %struct.NSObject** %color.466, align 4
21 %tmp107 = call float bitcast (void (%struct.NSObject*, ...)* @objc_msgSend_fpret to float (%struct.NSObject*, %struct.objc_selector*)*)( %struct.NSObject* %tmp106, %struct.objc_selector* %tmp105 ) nounwind
28 declare void @objc_msgSend_fpret(%struct.NSObject*, ...)