brintos

brintos / llvm-project-archived public Read only

0
0
Text · 995 B · fa53d53 Raw
37 lines · plain
1; RUN: opt -S -passes='require<profile-summary>,function(codegenprepare)' -mtriple=arm64-apple-ios7.0 %s | FileCheck %s2 3%foo = type { i8 }4 5define %foo @test_merge(i32 %in) {6; CHECK-LABEL: @test_merge7 8  ; CodeGenPrepare was requesting the EVT for { i8 } to determine9  ; whether the insertvalue user of the trunc was legal. This10  ; asserted.11 12; CHECK: insertvalue %foo undef, i8 %byte, 013  %lobit = lshr i32 %in, 3114  %byte = trunc i32 %lobit to i815  %struct = insertvalue %foo undef, i8 %byte, 016  ret %"foo" %struct17}18 19define ptr @test_merge_PR21548(i32 %a, ptr %p1, ptr %p2, ptr %p3) {20; CHECK-LABEL: @test_merge_PR2154821  %as = lshr i32 %a, 322  %Tr = trunc i32 %as to i123  br i1 %Tr, label %BB2, label %BB324 25BB2:26  ; Similarly to above:27  ; CodeGenPrepare was requesting the EVT for ptr to determine28  ; whether the select user of the trunc was legal. This asserted.29 30; CHECK: select i1 {{%.*}}, ptr %p1, ptr %p231  %p = select i1 %Tr, ptr %p1, ptr %p232  ret ptr %p33 34BB3:35  ret ptr %p336}37