You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SQA-Homework/dse/test/branch0.ll

67 lines
2.5 KiB

3 years ago
; ModuleID = 'branch0.c'
source_filename = "branch0.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: noinline nounwind optnone uwtable
define dso_local i32 @main() #0 {
entry:
%retval = alloca i32, align 4
%x = alloca i32, align 4
%y = alloca i32, align 4
%z = alloca i32, align 4
store i32 0, i32* %retval, align 4
call void @__DSE_Input__(i32* noundef %x, i32 noundef 0)
call void @__DSE_Input__(i32* noundef %y, i32 noundef 1)
call void @__DSE_Input__(i32* noundef %z, i32 noundef 2)
%0 = load i32, i32* %x, align 4
%cmp = icmp eq i32 %0, 1
3 years ago
br i1 %cmp, label %if.then, label %if.else
3 years ago
if.then: ; preds = %entry
%1 = load i32, i32* %y, align 4
%2 = load i32, i32* %z, align 4
%cmp1 = icmp eq i32 %1, %2
br i1 %cmp1, label %if.then2, label %if.end
if.then2: ; preds = %if.then
%3 = load i32, i32* %x, align 4
%4 = load i32, i32* %y, align 4
%5 = load i32, i32* %z, align 4
%sub = sub nsw i32 %4, %5
%div = sdiv i32 %3, %sub
store i32 %div, i32* %x, align 4
br label %if.end
if.end: ; preds = %if.then2, %if.then
3 years ago
br label %if.end6
3 years ago
3 years ago
if.else: ; preds = %entry
%6 = load i32, i32* %x, align 4
%cmp3 = icmp eq i32 %6, 0
br i1 %cmp3, label %if.then4, label %if.end5
if.then4: ; preds = %if.else
store i32 0, i32* %x, align 4
br label %if.end5
if.end5: ; preds = %if.then4, %if.else
br label %if.end6
if.end6: ; preds = %if.end5, %if.end
3 years ago
ret i32 0
}
declare dso_local void @__DSE_Input__(i32* noundef, i32 noundef) #1
attributes #0 = { noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
!llvm.module.flags = !{!0, !1, !2}
!llvm.ident = !{!3}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 7, !"uwtable", i32 1}
!2 = !{i32 7, !"frame-pointer", i32 2}
!3 = !{!"clang version 14.0.0"}