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
79 lines
2.8 KiB
LLVM
79 lines
2.8 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
|
|
; RUN: opt < %s -passes=gvn -S | FileCheck %s
|
|
|
|
; Two occurrences of strlen should be zapped.
|
|
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
|
|
target triple = "i386-apple-darwin9"
|
|
|
|
define i32 @test(i32 %g, ptr %P) nounwind {
|
|
; CHECK-LABEL: define i32 @test(
|
|
; CHECK-SAME: i32 [[G:%.*]], ptr [[P:%.*]]) #[[ATTR0:[0-9]+]] {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[TMP2:%.*]] = call i32 @strlen(ptr [[P]]) #[[ATTR1:[0-9]+]]
|
|
; CHECK-NEXT: [[TMP3:%.*]] = icmp eq i32 [[TMP2]], 100
|
|
; CHECK-NEXT: [[TMP34:%.*]] = zext i1 [[TMP3]] to i8
|
|
; CHECK-NEXT: br i1 [[TMP3]], label %[[BB:.*]], label %[[BB6:.*]]
|
|
; CHECK: [[BB]]:
|
|
; CHECK-NEXT: br label %[[BB27:.*]]
|
|
; CHECK: [[BB6]]:
|
|
; CHECK-NEXT: [[TMP8:%.*]] = add i32 [[G]], 42
|
|
; CHECK-NEXT: br i1 false, label %[[BB14:.*]], label %[[BB16:.*]]
|
|
; CHECK: [[BB14]]:
|
|
; CHECK-NEXT: br label %[[BB27]]
|
|
; CHECK: [[BB16]]:
|
|
; CHECK-NEXT: [[TMP18:%.*]] = mul i32 [[TMP8]], 2
|
|
; CHECK-NEXT: br i1 false, label %[[BB24:.*]], label %[[BB26:.*]]
|
|
; CHECK: [[BB24]]:
|
|
; CHECK-NEXT: br label %[[BB27]]
|
|
; CHECK: [[BB26]]:
|
|
; CHECK-NEXT: br label %[[BB27]]
|
|
; CHECK: [[BB27]]:
|
|
; CHECK-NEXT: [[TMP_0:%.*]] = phi i32 [ 11, %[[BB26]] ], [ poison, %[[BB24]] ], [ poison, %[[BB14]] ], [ [[G]], %[[BB]] ]
|
|
; CHECK-NEXT: ret i32 [[TMP_0]]
|
|
;
|
|
entry:
|
|
%tmp2 = call i32 @strlen( ptr %P ) nounwind readonly ; <i32> [#uses=1]
|
|
%tmp3 = icmp eq i32 %tmp2, 100 ; <i1> [#uses=1]
|
|
%tmp34 = zext i1 %tmp3 to i8 ; <i8> [#uses=1]
|
|
%toBool = icmp ne i8 %tmp34, 0 ; <i1> [#uses=1]
|
|
br i1 %toBool, label %bb, label %bb6
|
|
|
|
bb: ; preds = %entry
|
|
br label %bb27
|
|
|
|
bb6: ; preds = %entry
|
|
%tmp8 = add i32 %g, 42 ; <i32> [#uses=2]
|
|
%tmp10 = call i32 @strlen( ptr %P ) nounwind readonly ; <i32> [#uses=1]
|
|
%tmp11 = icmp eq i32 %tmp10, 100 ; <i1> [#uses=1]
|
|
%tmp1112 = zext i1 %tmp11 to i8 ; <i8> [#uses=1]
|
|
%toBool13 = icmp ne i8 %tmp1112, 0 ; <i1> [#uses=1]
|
|
br i1 %toBool13, label %bb14, label %bb16
|
|
|
|
bb14: ; preds = %bb6
|
|
br label %bb27
|
|
|
|
bb16: ; preds = %bb6
|
|
%tmp18 = mul i32 %tmp8, 2 ; <i32> [#uses=1]
|
|
%tmp20 = call i32 @strlen( ptr %P ) nounwind readonly ; <i32> [#uses=1]
|
|
%tmp21 = icmp eq i32 %tmp20, 100 ; <i1> [#uses=1]
|
|
%tmp2122 = zext i1 %tmp21 to i8 ; <i8> [#uses=1]
|
|
%toBool23 = icmp ne i8 %tmp2122, 0 ; <i1> [#uses=1]
|
|
br i1 %toBool23, label %bb24, label %bb26
|
|
|
|
bb24: ; preds = %bb16
|
|
br label %bb27
|
|
|
|
bb26: ; preds = %bb16
|
|
br label %bb27
|
|
|
|
bb27: ; preds = %bb26, %bb24, %bb14, %bb
|
|
%tmp.0 = phi i32 [ 11, %bb26 ], [ %tmp18, %bb24 ], [ %tmp8, %bb14 ], [ %g, %bb ] ; <i32> [#uses=1]
|
|
br label %return
|
|
|
|
return: ; preds = %bb27
|
|
ret i32 %tmp.0
|
|
}
|
|
|
|
|
|
declare i32 @strlen(ptr) nounwind readonly
|