35 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -S -passes=mergeicmps < %s | FileCheck %s3 4target triple = "x86_64-unknown-unknown"5 6%S = type { i32, i32 }7 8define i1 @test(ptr dereferenceable(8) %a, ptr dereferenceable(8) %b) {9; CHECK-LABEL: @test(10; CHECK-NEXT: "entry+land.rhs.i":11; CHECK-NEXT: [[MEMCMP:%.*]] = call i32 @memcmp(ptr [[A:%.*]], ptr [[B:%.*]], i64 8)12; CHECK-NEXT: [[TMP0:%.*]] = icmp eq i32 [[MEMCMP]], 013; CHECK-NEXT: br label [[OPEQ1_EXIT:%.*]]14; CHECK: opeq1.exit:15; CHECK-NEXT: ret i1 [[TMP0]]16;17entry:18 %v0 = load i32, ptr %a, align 419 %v1 = load i32, ptr %b, align 420 %cmp.i = icmp eq i32 %v0, %v121 br i1 %cmp.i, label %land.rhs.i, label %opeq1.exit22 23land.rhs.i: ; preds = %entry24 %second.i = getelementptr inbounds %S, ptr %a, i64 0, i32 125 %v2 = load i32, ptr %second.i, align 426 %second2.i = getelementptr inbounds %S, ptr %b, i64 0, i32 127 %v3 = load i32, ptr %second2.i, align 428 %cmp3.i = icmp eq i32 %v2, %v329 br label %opeq1.exit30 31opeq1.exit: ; preds = %land.rhs.i, %entry32 %phi = phi i1 [ false, %entry ], [ %cmp3.i, %land.rhs.i ]33 ret i1 %phi34}35