1; RUN: llc < %s -march=x86-64 -O0 | FileCheck %s
2; Make sure fast-isel doesn't reset the materialised constant map
3; across an intrinsic call.
4
5; CHECK: movl	$100000
6; CHECK-NOT: movl	$100000
7define i1 @test1(i32 %v1, i32 %v2, i32* %X) nounwind {
8entry:
9  %a = shl i32 100000, %v1
10  %t = call {i32, i1} @llvm.sadd.with.overflow.i32(i32 %a, i32 %v2)
11  %ext = extractvalue {i32, i1} %t, 0
12  %sum = shl i32 100000, %ext
13  %obit = extractvalue {i32, i1} %t, 1
14  br i1 %obit, label %overflow, label %normal
15
16normal:
17  store i32 %sum, i32* %X
18  br label %overflow
19
20overflow:
21  ret i1 false
22}
23
24declare {i32, i1} @llvm.sadd.with.overflow.i32(i32, i32)
25