1 ; RUN: opt < %s -msan -msan-check-access-address=0 -S | FileCheck %s
2 ; RUN: opt < %s -msan -msan-check-access-address=0 -msan-track-origins=1 -S | FileCheck -check-prefix=CHECK -check-prefix=CHECK-ORIGINS %s
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
5 target triple = "x86_64-unknown-linux-gnu"
7 ; Check the presence of __msan_init
8 ; CHECK: @llvm.global_ctors {{.*}} @__msan_init
10 ; Check the presence and the linkage type of __msan_track_origins and
11 ; other interface symbols.
12 ; CHECK-NOT: @__msan_track_origins
13 ; CHECK-ORIGINS: @__msan_track_origins = weak_odr constant i32 1
14 ; CHECK-NOT: @__msan_keep_going = weak_odr constant i32 0
15 ; CHECK: @__msan_retval_tls = external thread_local(initialexec) global [{{.*}}]
16 ; CHECK: @__msan_retval_origin_tls = external thread_local(initialexec) global i32
17 ; CHECK: @__msan_param_tls = external thread_local(initialexec) global [{{.*}}]
18 ; CHECK: @__msan_param_origin_tls = external thread_local(initialexec) global [{{.*}}]
19 ; CHECK: @__msan_va_arg_tls = external thread_local(initialexec) global [{{.*}}]
20 ; CHECK: @__msan_va_arg_overflow_size_tls = external thread_local(initialexec) global i64
21 ; CHECK: @__msan_origin_tls = external thread_local(initialexec) global i32
24 ; Check instrumentation of stores
26 define void @Store(i32* nocapture %p, i32 %x) nounwind uwtable sanitize_memory {
28 store i32 %x, i32* %p, align 4
33 ; CHECK: load {{.*}} @__msan_param_tls
34 ; CHECK-ORIGINS: load {{.*}} @__msan_param_origin_tls
37 ; CHECK-ORIGINS: br i1
38 ; CHECK-ORIGINS: <label>
39 ; CHECK-ORIGINS: store
40 ; CHECK-ORIGINS: br label
41 ; CHECK-ORIGINS: <label>
46 ; Check instrumentation of aligned stores
47 ; Shadow store has the same alignment as the original store; origin store
48 ; does not specify explicit alignment.
50 define void @AlignedStore(i32* nocapture %p, i32 %x) nounwind uwtable sanitize_memory {
52 store i32 %x, i32* %p, align 32
56 ; CHECK: @AlignedStore
57 ; CHECK: load {{.*}} @__msan_param_tls
58 ; CHECK-ORIGINS: load {{.*}} @__msan_param_origin_tls
59 ; CHECK: store {{.*}} align 32
61 ; CHECK-ORIGINS: br i1
62 ; CHECK-ORIGINS: <label>
63 ; CHECK-ORIGINS: store {{.*}} align 32
64 ; CHECK-ORIGINS: br label
65 ; CHECK-ORIGINS: <label>
66 ; CHECK: store {{.*}} align 32
70 ; load followed by cmp: check that we load the shadow and call __msan_warning.
71 define void @LoadAndCmp(i32* nocapture %a) nounwind uwtable sanitize_memory {
73 %0 = load i32* %a, align 4
74 %tobool = icmp eq i32 %0, 0
75 br i1 %tobool, label %if.end, label %if.then
77 if.then: ; preds = %entry
78 tail call void (...)* @foo() nounwind
81 if.end: ; preds = %entry, %if.then
85 declare void @foo(...)
90 ; CHECK: call void @__msan_warning_noreturn()
91 ; CHECK-NEXT: call void asm sideeffect
92 ; CHECK-NEXT: unreachable
95 ; Check that we store the shadow for the retval.
96 define i32 @ReturnInt() nounwind uwtable readnone sanitize_memory {
102 ; CHECK: store i32 0,{{.*}}__msan_retval_tls
105 ; Check that we get the shadow for the retval.
106 define void @CopyRetVal(i32* nocapture %a) nounwind uwtable sanitize_memory {
108 %call = tail call i32 @ReturnInt() nounwind
109 store i32 %call, i32* %a, align 4
114 ; CHECK: load{{.*}}__msan_retval_tls
120 ; Check that we generate PHIs for shadow.
121 define void @FuncWithPhi(i32* nocapture %a, i32* %b, i32* nocapture %c) nounwind uwtable sanitize_memory {
123 %tobool = icmp eq i32* %b, null
124 br i1 %tobool, label %if.else, label %if.then
126 if.then: ; preds = %entry
127 %0 = load i32* %b, align 4
130 if.else: ; preds = %entry
131 %1 = load i32* %c, align 4
134 if.end: ; preds = %if.else, %if.then
135 %t.0 = phi i32 [ %0, %if.then ], [ %1, %if.else ]
136 store i32 %t.0, i32* %a, align 4
140 ; CHECK: @FuncWithPhi
147 ; Compute shadow for "x << 10"
148 define void @ShlConst(i32* nocapture %x) nounwind uwtable sanitize_memory {
150 %0 = load i32* %x, align 4
152 store i32 %1, i32* %x, align 4
165 ; Compute shadow for "10 << x": it should have 'sext i1'.
166 define void @ShlNonConst(i32* nocapture %x) nounwind uwtable sanitize_memory {
168 %0 = load i32* %x, align 4
170 store i32 %1, i32* %x, align 4
174 ; CHECK: @ShlNonConst
183 define void @SExt(i32* nocapture %a, i16* nocapture %b) nounwind uwtable sanitize_memory {
185 %0 = load i16* %b, align 2
186 %1 = sext i16 %0 to i32
187 store i32 %1, i32* %a, align 4
202 define void @MemSet(i8* nocapture %x) nounwind uwtable sanitize_memory {
204 call void @llvm.memset.p0i8.i64(i8* %x, i8 42, i64 10, i32 1, i1 false)
208 declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
211 ; CHECK: call i8* @__msan_memset
216 define void @MemCpy(i8* nocapture %x, i8* nocapture %y) nounwind uwtable sanitize_memory {
218 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %x, i8* %y, i64 10, i32 1, i1 false)
222 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
225 ; CHECK: call i8* @__msan_memcpy
229 ; memmove is lowered to a call
230 define void @MemMove(i8* nocapture %x, i8* nocapture %y) nounwind uwtable sanitize_memory {
232 call void @llvm.memmove.p0i8.p0i8.i64(i8* %x, i8* %y, i64 10, i32 1, i1 false)
236 declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
239 ; CHECK: call i8* @__msan_memmove
243 ; Check that we propagate shadow for "select"
245 define i32 @Select(i32 %a, i32 %b, i1 %c) nounwind uwtable readnone sanitize_memory {
247 %cond = select i1 %c, i32 %a, i32 %b
253 ; CHECK-NEXT: sext i1 {{.*}} to i32
256 ; CHECK-ORIGINS: select
257 ; CHECK-ORIGINS: select
261 ; Check that we propagate origin for "select" with vector condition.
262 ; Select condition is flattened to i1, which is then used to select one of the
265 define <8 x i16> @SelectVector(<8 x i16> %a, <8 x i16> %b, <8 x i1> %c) nounwind uwtable readnone sanitize_memory {
267 %cond = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b
271 ; CHECK: @SelectVector
272 ; CHECK: select <8 x i1>
273 ; CHECK-NEXT: sext <8 x i1> {{.*}} to <8 x i16>
274 ; CHECK-NEXT: or <8 x i16>
275 ; CHECK-ORIGINS: bitcast <8 x i1> {{.*}} to i8
276 ; CHECK-ORIGINS: icmp ne i8 {{.*}}, 0
277 ; CHECK-ORIGINS: select i1
278 ; CHECK: select <8 x i1>
279 ; CHECK: ret <8 x i16>
283 ; Check that we propagate origin for "select" with scalar condition and vector
284 ; arguments. Select condition shadow is sign-extended to the vector type and
285 ; mixed into the result shadow.
287 define <8 x i16> @SelectVector2(<8 x i16> %a, <8 x i16> %b, i1 %c) nounwind uwtable readnone sanitize_memory {
289 %cond = select i1 %c, <8 x i16> %a, <8 x i16> %b
293 ; CHECK: @SelectVector2
295 ; CHECK: sext i1 {{.*}} to i128
296 ; CHECK: bitcast i128 {{.*}} to <8 x i16>
297 ; CHECK: or <8 x i16>
299 ; CHECK: ret <8 x i16>
302 define { i64, i64 } @SelectStruct(i1 zeroext %x, { i64, i64 } %a, { i64, i64 } %b) readnone sanitize_memory {
304 %c = select i1 %x, { i64, i64 } %a, { i64, i64 } %b
308 ; CHECK: @SelectStruct
309 ; CHECK: select i1 {{.*}}, { i64, i64 }
310 ; CHECK-NEXT: select i1 {{.*}}, { i64, i64 } { i64 -1, i64 -1 }, { i64, i64 }
311 ; CHECK-ORIGINS: select i1
312 ; CHECK-NEXT: select i1 {{.*}}, { i64, i64 }
313 ; CHECK: ret { i64, i64 }
316 define i8* @IntToPtr(i64 %x) nounwind uwtable readnone sanitize_memory {
318 %0 = inttoptr i64 %x to i8*
323 ; CHECK: load i64*{{.*}}__msan_param_tls
324 ; CHECK-ORIGINS-NEXT: load i32*{{.*}}__msan_param_origin_tls
325 ; CHECK-NEXT: inttoptr
326 ; CHECK-NEXT: store i64{{.*}}__msan_retval_tls
330 define i8* @IntToPtr_ZExt(i16 %x) nounwind uwtable readnone sanitize_memory {
332 %0 = inttoptr i16 %x to i8*
336 ; CHECK: @IntToPtr_ZExt
337 ; CHECK: load i16*{{.*}}__msan_param_tls
339 ; CHECK-NEXT: inttoptr
340 ; CHECK-NEXT: store i64{{.*}}__msan_retval_tls
344 ; Check that we insert exactly one check on udiv
345 ; (2nd arg shadow is checked, 1st arg shadow is propagated)
347 define i32 @Div(i32 %a, i32 %b) nounwind uwtable readnone sanitize_memory {
349 %div = udiv i32 %a, %b
355 ; CHECK: call void @__msan_warning
362 ; Check that we propagate shadow for x<0, x>=0, etc (i.e. sign bit tests)
364 define zeroext i1 @ICmpSLT(i32 %x) nounwind uwtable readnone sanitize_memory {
365 %1 = icmp slt i32 %x, 0
371 ; CHECK-NOT: call void @__msan_warning
373 ; CHECK-NOT: call void @__msan_warning
376 define zeroext i1 @ICmpSGE(i32 %x) nounwind uwtable readnone sanitize_memory {
377 %1 = icmp sge i32 %x, 0
383 ; CHECK-NOT: call void @__msan_warning
385 ; CHECK-NOT: call void @__msan_warning
388 define zeroext i1 @ICmpSGT(i32 %x) nounwind uwtable readnone sanitize_memory {
389 %1 = icmp sgt i32 0, %x
395 ; CHECK-NOT: call void @__msan_warning
397 ; CHECK-NOT: call void @__msan_warning
400 define zeroext i1 @ICmpSLE(i32 %x) nounwind uwtable readnone sanitize_memory {
401 %1 = icmp sle i32 0, %x
407 ; CHECK-NOT: call void @__msan_warning
409 ; CHECK-NOT: call void @__msan_warning
413 ; Check that we propagate shadow for x<0, x>=0, etc (i.e. sign bit tests)
414 ; of the vector arguments.
416 define <2 x i1> @ICmpSLT_vector(<2 x i32*> %x) nounwind uwtable readnone sanitize_memory {
417 %1 = icmp slt <2 x i32*> %x, zeroinitializer
421 ; CHECK: @ICmpSLT_vector
422 ; CHECK: icmp slt <2 x i64>
423 ; CHECK-NOT: call void @__msan_warning
424 ; CHECK: icmp slt <2 x i32*>
425 ; CHECK-NOT: call void @__msan_warning
426 ; CHECK: ret <2 x i1>
429 ; Check that we propagate shadow for unsigned relational comparisons with
432 define zeroext i1 @ICmpUGTConst(i32 %x) nounwind uwtable readnone sanitize_memory {
434 %cmp = icmp ugt i32 %x, 7
438 ; CHECK: @ICmpUGTConst
439 ; CHECK: icmp ugt i32
440 ; CHECK-NOT: call void @__msan_warning
441 ; CHECK: icmp ugt i32
442 ; CHECK-NOT: call void @__msan_warning
443 ; CHECK: icmp ugt i32
444 ; CHECK-NOT: call void @__msan_warning
448 ; Check that loads of shadow have the same aligment as the original loads.
449 ; Check that loads of origin have the aligment of max(4, original alignment).
451 define i32 @ShadowLoadAlignmentLarge() nounwind uwtable sanitize_memory {
452 %y = alloca i32, align 64
453 %1 = load volatile i32* %y, align 64
457 ; CHECK: @ShadowLoadAlignmentLarge
458 ; CHECK: load volatile i32* {{.*}} align 64
459 ; CHECK: load i32* {{.*}} align 64
462 define i32 @ShadowLoadAlignmentSmall() nounwind uwtable sanitize_memory {
463 %y = alloca i32, align 2
464 %1 = load volatile i32* %y, align 2
468 ; CHECK: @ShadowLoadAlignmentSmall
469 ; CHECK: load volatile i32* {{.*}} align 2
470 ; CHECK: load i32* {{.*}} align 2
471 ; CHECK-ORIGINS: load i32* {{.*}} align 4
475 ; Test vector manipulation instructions.
476 ; Check that the same bit manipulation is applied to the shadow values.
477 ; Check that there is a zero test of the shadow of %idx argument, where present.
479 define i32 @ExtractElement(<4 x i32> %vec, i32 %idx) sanitize_memory {
480 %x = extractelement <4 x i32> %vec, i32 %idx
484 ; CHECK: @ExtractElement
485 ; CHECK: extractelement
486 ; CHECK: call void @__msan_warning
487 ; CHECK: extractelement
490 define <4 x i32> @InsertElement(<4 x i32> %vec, i32 %idx, i32 %x) sanitize_memory {
491 %vec1 = insertelement <4 x i32> %vec, i32 %x, i32 %idx
495 ; CHECK: @InsertElement
496 ; CHECK: insertelement
497 ; CHECK: call void @__msan_warning
498 ; CHECK: insertelement
499 ; CHECK: ret <4 x i32>
501 define <4 x i32> @ShuffleVector(<4 x i32> %vec, <4 x i32> %vec1) sanitize_memory {
502 %vec2 = shufflevector <4 x i32> %vec, <4 x i32> %vec1,
503 <4 x i32> <i32 0, i32 4, i32 1, i32 5>
507 ; CHECK: @ShuffleVector
508 ; CHECK: shufflevector
509 ; CHECK-NOT: call void @__msan_warning
510 ; CHECK: shufflevector
511 ; CHECK: ret <4 x i32>
514 ; Test bswap intrinsic instrumentation
515 define i32 @BSwap(i32 %x) nounwind uwtable readnone sanitize_memory {
516 %y = tail call i32 @llvm.bswap.i32(i32 %x)
520 declare i32 @llvm.bswap.i32(i32) nounwind readnone
523 ; CHECK-NOT: call void @__msan_warning
524 ; CHECK: @llvm.bswap.i32
525 ; CHECK-NOT: call void @__msan_warning
526 ; CHECK: @llvm.bswap.i32
527 ; CHECK-NOT: call void @__msan_warning
533 define void @StoreIntrinsic(i8* %p, <4 x float> %x) nounwind uwtable sanitize_memory {
534 call void @llvm.x86.sse.storeu.ps(i8* %p, <4 x float> %x)
538 declare void @llvm.x86.sse.storeu.ps(i8*, <4 x float>) nounwind
540 ; CHECK: @StoreIntrinsic
543 ; CHECK: store <4 x i32> {{.*}} align 1
544 ; CHECK: call void @llvm.x86.sse.storeu.ps
550 define <16 x i8> @LoadIntrinsic(i8* %p) nounwind uwtable sanitize_memory {
551 %call = call <16 x i8> @llvm.x86.sse3.ldu.dq(i8* %p)
555 declare <16 x i8> @llvm.x86.sse3.ldu.dq(i8* %p) nounwind
557 ; CHECK: @LoadIntrinsic
558 ; CHECK: load <16 x i8>* {{.*}} align 1
559 ; CHECK-ORIGINS: [[ORIGIN:%[01-9a-z]+]] = load i32* {{.*}}
562 ; CHECK: call <16 x i8> @llvm.x86.sse3.ldu.dq
563 ; CHECK: store <16 x i8> {{.*}} @__msan_retval_tls
564 ; CHECK-ORIGINS: store i32 {{.*}}[[ORIGIN]], i32* @__msan_retval_origin_tls
565 ; CHECK: ret <16 x i8>
568 ; Simple NoMem intrinsic
569 ; Check that shadow is OR'ed, and origin is Select'ed
570 ; And no shadow checks!
572 define <8 x i16> @Paddsw128(<8 x i16> %a, <8 x i16> %b) nounwind uwtable sanitize_memory {
573 %call = call <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %a, <8 x i16> %b)
577 declare <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %a, <8 x i16> %b) nounwind
580 ; CHECK-NEXT: load <8 x i16>* {{.*}} @__msan_param_tls
581 ; CHECK-ORIGINS: load i32* {{.*}} @__msan_param_origin_tls
582 ; CHECK-NEXT: load <8 x i16>* {{.*}} @__msan_param_tls
583 ; CHECK-ORIGINS: load i32* {{.*}} @__msan_param_origin_tls
584 ; CHECK-NEXT: = or <8 x i16>
585 ; CHECK-ORIGINS: = bitcast <8 x i16> {{.*}} to i128
586 ; CHECK-ORIGINS-NEXT: = icmp ne i128 {{.*}}, 0
587 ; CHECK-ORIGINS-NEXT: = select i1 {{.*}}, i32 {{.*}}, i32
588 ; CHECK-NEXT: call <8 x i16> @llvm.x86.sse2.padds.w
589 ; CHECK-NEXT: store <8 x i16> {{.*}} @__msan_retval_tls
590 ; CHECK-ORIGINS: store i32 {{.*}} @__msan_retval_origin_tls
591 ; CHECK-NEXT: ret <8 x i16>
594 ; Test handling of vectors of pointers.
595 ; Check that shadow of such vector is a vector of integers.
597 define <8 x i8*> @VectorOfPointers(<8 x i8*>* %p) nounwind uwtable sanitize_memory {
598 %x = load <8 x i8*>* %p
602 ; CHECK: @VectorOfPointers
603 ; CHECK: load <8 x i8*>*
604 ; CHECK: load <8 x i64>*
605 ; CHECK: store <8 x i64> {{.*}} @__msan_retval_tls
606 ; CHECK: ret <8 x i8*>
608 ; Test handling of va_copy.
610 declare void @llvm.va_copy(i8*, i8*) nounwind
612 define void @VACopy(i8* %p1, i8* %p2) nounwind uwtable sanitize_memory {
613 call void @llvm.va_copy(i8* %p1, i8* %p2) nounwind
618 ; CHECK: call void @llvm.memset.p0i8.i64({{.*}}, i8 0, i64 24, i32 8, i1 false)
622 ; Test that va_start instrumentation does not use va_arg_tls*.
623 ; It should work with a local stack copy instead.
625 %struct.__va_list_tag = type { i32, i32, i8*, i8* }
626 declare void @llvm.va_start(i8*) nounwind
628 ; Function Attrs: nounwind uwtable
629 define void @VAStart(i32 %x, ...) {
631 %x.addr = alloca i32, align 4
632 %va = alloca [1 x %struct.__va_list_tag], align 16
633 store i32 %x, i32* %x.addr, align 4
634 %arraydecay = getelementptr inbounds [1 x %struct.__va_list_tag]* %va, i32 0, i32 0
635 %arraydecay1 = bitcast %struct.__va_list_tag* %arraydecay to i8*
636 call void @llvm.va_start(i8* %arraydecay1)
641 ; CHECK: call void @llvm.va_start
642 ; CHECK-NOT: @__msan_va_arg_tls
643 ; CHECK-NOT: @__msan_va_arg_overflow_size_tls
647 ; Test handling of volatile stores.
648 ; Check that MemorySanitizer does not add a check of the value being stored.
650 define void @VolatileStore(i32* nocapture %p, i32 %x) nounwind uwtable sanitize_memory {
652 store volatile i32 %x, i32* %p, align 4
656 ; CHECK: @VolatileStore
657 ; CHECK-NOT: @__msan_warning
661 ; Test that checks are omitted but shadow propagation is kept if
662 ; sanitize_memory attribute is missing.
664 define i32 @NoSanitizeMemory(i32 %x) uwtable {
666 %tobool = icmp eq i32 %x, 0
667 br i1 %tobool, label %if.end, label %if.then
669 if.then: ; preds = %entry
670 tail call void @bar()
673 if.end: ; preds = %entry, %if.then
679 ; CHECK: @NoSanitizeMemory
680 ; CHECK-NOT: @__msan_warning
681 ; CHECK: load i32* {{.*}} @__msan_param_tls
682 ; CHECK-NOT: @__msan_warning
683 ; CHECK: store {{.*}} @__msan_retval_tls
684 ; CHECK-NOT: @__msan_warning
688 ; Test that stack allocations are unpoisoned in functions missing
689 ; sanitize_memory attribute
691 define i32 @NoSanitizeMemoryAlloca() {
693 %p = alloca i32, align 4
694 %x = call i32 @NoSanitizeMemoryAllocaHelper(i32* %p)
698 declare i32 @NoSanitizeMemoryAllocaHelper(i32* %p)
700 ; CHECK: @NoSanitizeMemoryAlloca
701 ; CHECK: call void @llvm.memset.p0i8.i64(i8* {{.*}}, i8 0, i64 4, i32 4, i1 false)
702 ; CHECK: call i32 @NoSanitizeMemoryAllocaHelper(i32*
706 ; Test that undef is unpoisoned in functions missing
707 ; sanitize_memory attribute
709 define i32 @NoSanitizeMemoryUndef() {
711 %x = call i32 @NoSanitizeMemoryUndefHelper(i32 undef)
715 declare i32 @NoSanitizeMemoryUndefHelper(i32 %x)
717 ; CHECK: @NoSanitizeMemoryAlloca
718 ; CHECK: store i32 0, i32* {{.*}} @__msan_param_tls
719 ; CHECK: call i32 @NoSanitizeMemoryUndefHelper(i32 undef)
723 ; Test argument shadow alignment
725 define <2 x i64> @ArgumentShadowAlignment(i64 %a, <2 x i64> %b) sanitize_memory {
730 ; CHECK: @ArgumentShadowAlignment
731 ; CHECK: load <2 x i64>* {{.*}} @__msan_param_tls {{.*}}, align 8
732 ; CHECK: store <2 x i64> {{.*}} @__msan_retval_tls {{.*}}, align 8
733 ; CHECK: ret <2 x i64>
736 ; Test origin propagation for insertvalue
738 define { i64, i32 } @make_pair_64_32(i64 %x, i32 %y) sanitize_memory {
740 %a = insertvalue { i64, i32 } undef, i64 %x, 0
741 %b = insertvalue { i64, i32 } %a, i32 %y, 1
745 ; CHECK-ORIGINS: @make_pair_64_32
746 ; First element shadow
747 ; CHECK-ORIGINS: insertvalue { i64, i32 } { i64 -1, i32 -1 }, i64 {{.*}}, 0
748 ; First element origin
749 ; CHECK-ORIGINS: icmp ne i64
750 ; CHECK-ORIGINS: select i1
751 ; First element app value
752 ; CHECK-ORIGINS: insertvalue { i64, i32 } undef, i64 {{.*}}, 0
753 ; Second element shadow
754 ; CHECK-ORIGINS: insertvalue { i64, i32 } {{.*}}, i32 {{.*}}, 1
755 ; Second element origin
756 ; CHECK-ORIGINS: icmp ne i32
757 ; CHECK-ORIGINS: select i1
758 ; Second element app value
759 ; CHECK-ORIGINS: insertvalue { i64, i32 } {{.*}}, i32 {{.*}}, 1
760 ; CHECK-ORIGINS: ret { i64, i32 }