; RUN: opt -S -consthoist -consthoist-with-block-frequency=false < %s | FileCheck %s ; RUN: opt -S -consthoist -consthoist-with-block-frequency=true < %s | FileCheck --check-prefix=BFIHOIST %s target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-windows-msvc" ; CHECK-LABEL: define i32 @main ; CHECK: %tobool = icmp eq i32 %argc, 0 ; CHECK-NEXT: bitcast i64 9209618997431186100 to i64 ; CHECK-NEXT: br i1 %tobool ; BFIHOIST-LABEL: define i32 @main ; BFIHOIST: then: ; BFIHOIST: %[[CONST1:.*]] = bitcast i64 9209618997431186100 to i64 ; BFIHOIST: %add = add i64 %call4, %[[CONST1]] ; BFIHOIST: br label %endif ; BFIHOIST: else: ; BFIHOIST: %[[CONST2:.*]] = bitcast i64 9209618997431186100 to i64 ; BFIHOIST: %add6 = add i64 %call5, %[[CONST2]] ; BFIHOIST: br label %endif ; Function Attrs: norecurse define i32 @main(i32 %argc, i8** nocapture readnone %argv) local_unnamed_addr #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { %call = tail call i64 @fn(i64 0) %call1 = tail call i64 @fn(i64 1) %tobool = icmp eq i32 %argc, 0 br i1 %tobool, label %2, label %1 ;