brintos

brintos / llvm-project-archived public Read only

0
0
Text · 546 B · 88caf5c Raw
18 lines · plain
1; RUN: llc -mtriple=sparc < %s2 3;; getBooleanContents on Sparc used to claim that no bits mattered4;; other than the first for SELECT. Thus, the 'trunc' got eliminated5;; as redundant. But, cmp does NOT ignore the other bits!6 7; CHECK-LABEL: select_mask:8; CHECK: ldub [%o0], [[R:%[goli][0-7]]]9; CHECK: and [[R]], 1, [[V:%[goli][0-7]]]10; CHECK: cmp [[V]], 011define i32 @select_mask(ptr %this) {12entry:13  %bf.load2 = load i8, ptr %this, align 414  %bf.cast5 = trunc i8 %bf.load2 to i115  %cond = select i1 %bf.cast5, i32 2, i32 016  ret i32 %cond17}18