brintos

brintos / llvm-project-archived public Read only

0
0
Text · 859 B · d93d54f Raw
26 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 22; RUN: llc -mtriple=x86_64-- < %s | FileCheck %s3 4; It's not possible to directly or the two loads together, because this might5; propagate a poison value from the second load (which has !range but not6; !noundef).7define i8 @test(ptr %p) {8; CHECK-LABEL: test:9; CHECK:       # %bb.0:10; CHECK-NEXT:    movzbl 1(%rdi), %eax11; CHECK-NEXT:    orb (%rdi), %al12; CHECK-NEXT:    setne %al13; CHECK-NEXT:    addb %al, %al14; CHECK-NEXT:    retq15  %v1 = load i8, ptr %p, align 4, !range !0, !noundef !{}16  %cmp1 = icmp ne i8 %v1, 017  %p2 = getelementptr inbounds i8, ptr %p, i64 118  %v2 = load i8, ptr %p2, align 1, !range !019  %cmp2 = icmp ne i8 %v2, 020  %or = select i1 %cmp1, i1 true, i1 %cmp221  %res = select i1 %or, i8 2, i8 022  ret i8 %res23}24 25!0 = !{i8 0, i8 2}26