CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
70 lines
2.7 KiB
LLVM
70 lines
2.7 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
|
|
; RUN: opt -passes=newgvn %s -S | FileCheck %s
|
|
|
|
declare void @use(i32)
|
|
|
|
; Make sure !tbaa metadata is preserved when only ssa_copy calls introduced by
|
|
; PredicateInfo are replaced.
|
|
|
|
define i32 @test(ptr %p1, ptr %p2, i1 %c) {
|
|
; CHECK-LABEL: define i32 @test(
|
|
; CHECK-SAME: ptr [[P1:%.*]], ptr [[P2:%.*]], i1 [[C:%.*]]) {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[LV:%.*]] = load i32, ptr [[P1]], align 8, !tbaa [[INT_TBAA0:![0-9]+]]
|
|
; CHECK-NEXT: [[CMP_1:%.*]] = icmp slt i32 [[LV]], 1
|
|
; CHECK-NEXT: br i1 [[CMP_1]], label %[[EXIT:.*]], label %[[IF_FALSE:.*]]
|
|
; CHECK: [[IF_FALSE]]:
|
|
; CHECK-NEXT: br i1 [[C]], label %[[EXIT]], label %[[FOR_CHECK:.*]]
|
|
; CHECK: [[FOR_CHECK]]:
|
|
; CHECK-NEXT: [[CMP_2:%.*]] = icmp sgt i32 [[LV]], 0
|
|
; CHECK-NEXT: br i1 [[CMP_2]], label %[[FOR_PH:.*]], label %[[EXIT]]
|
|
; CHECK: [[FOR_PH]]:
|
|
; CHECK-NEXT: br label %[[FOR_BODY:.*]]
|
|
; CHECK: [[FOR_BODY]]:
|
|
; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, %[[FOR_PH]] ], [ [[IV_NEXT:%.*]], %[[FOR_BODY]] ]
|
|
; CHECK-NEXT: call void @use(i32 [[IV]])
|
|
; CHECK-NEXT: [[IV_NEXT]] = add nuw nsw i32 [[IV]], 1
|
|
; CHECK-NEXT: [[CMP_3:%.*]] = icmp ne i32 [[IV_NEXT]], [[LV]]
|
|
; CHECK-NEXT: br i1 [[CMP_3]], label %[[FOR_BODY]], label %[[EXIT]]
|
|
; CHECK: [[EXIT]]:
|
|
; CHECK-NEXT: ret i32 [[LV]]
|
|
;
|
|
entry:
|
|
%lv = load i32, ptr %p1, align 8, !tbaa !0
|
|
%cmp.1 = icmp slt i32 %lv, 1
|
|
br i1 %cmp.1, label %exit, label %if.false
|
|
|
|
if.false: ; preds = %entry
|
|
br i1 %c, label %exit, label %for.check
|
|
|
|
for.check: ; preds = %if.false
|
|
%cmp.2 = icmp sgt i32 %lv, 0
|
|
br i1 %cmp.2, label %for.ph, label %exit
|
|
|
|
for.ph: ; preds = %for.check
|
|
br label %for.body
|
|
|
|
for.body: ; preds = %for.body, %for.ph
|
|
%iv = phi i32 [ 0, %for.ph ], [ %iv.next, %for.body ]
|
|
call void @use(i32 %iv)
|
|
%iv.next = add nuw nsw i32 %iv, 1
|
|
%cmp.3 = icmp ne i32 %iv.next, %lv
|
|
br i1 %cmp.3, label %for.body, label %exit
|
|
|
|
exit: ; preds = %for.body, %for.check, %if.false, %entry
|
|
ret i32 %lv
|
|
}
|
|
|
|
!0 = !{!1, !2, i64 0}
|
|
!1 = !{!"FULL", !2, i64 0, !2, i64 4, !3, i64 8}
|
|
!2 = !{!"int", !3, i64 0}
|
|
!3 = !{!"omnipotent char", !4, i64 0}
|
|
!4 = !{!"Simple C/C++ TBAA"}
|
|
;.
|
|
; CHECK: [[INT_TBAA0]] = !{[[META1:![0-9]+]], [[META2:![0-9]+]], i64 0}
|
|
; CHECK: [[META1]] = !{!"FULL", [[META2]], i64 0, [[META2]], i64 4, [[META3:![0-9]+]], i64 8}
|
|
; CHECK: [[META2]] = !{!"int", [[META3]], i64 0}
|
|
; CHECK: [[META3]] = !{!"omnipotent char", [[META4:![0-9]+]], i64 0}
|
|
; CHECK: [[META4]] = !{!"Simple C/C++ TBAA"}
|
|
;.
|