brintos

brintos / llvm-project-archived public Read only

0
0
Text · 771 B · f56463a Raw
28 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -S -O3 < %s | FileCheck %s3 4; A miscompilation found on https://github.com/llvm/llvm-project/issues/64289.5; 1. PostOrderFunctionAttrsPass added readonly to the parameter.6; 2. TailCallElimPass modified the parameter but kept readonly.7; 3. LICMPass incorrectly hoisted the load instruction.8 9define void @pr64289(ptr noalias byval(i64) %x) {10; CHECK-LABEL: @pr64289(11; CHECK-NEXT:  start:12; CHECK-NEXT:    ret void13;14start:15  %new_x = alloca i64, align 816  %x_val = load i64, ptr %x, align 817  %is_zero = icmp eq i64 %x_val, 018  br i1 %is_zero, label %end, label %recurse19 20recurse:21  store i64 0, ptr %new_x, align 822  call void @pr64289(ptr %new_x)23  br label %end24 25end:26  ret void27}28