Demo entry 6716414

ir

   

Submitted by anonymous on Feb 20, 2018 at 09:22
Language: Agda. Code size: 1.4 kB.

; Function Attrs: nounwind uwtable
define i32 @main() #0 {
  %backlog = alloca %struct.test_struct*, align 8
  %aStruct = alloca %struct.test_struct, align 4
  %1 = load %struct.a_struct*, %struct.a_struct** @cpg, align 8
  %2 = getelementptr inbounds %struct.a_struct, %struct.a_struct* %1, i64 0, i32 1
  store i32 1, i32* %2, align 4
  %3 = getelementptr inbounds %struct.test_struct, %struct.test_struct* %aStruct, i64 0, i32 0
  store i32 1, i32* %3, align 4
  %4 = getelementptr inbounds %struct.test_struct, %struct.test_struct* %aStruct, i64 0, i32 1
  store i32 1, i32* %4, align 4
  %5 = load %struct.a_struct*, %struct.a_struct** @cpg, align 8
  %6 = getelementptr inbounds %struct.a_struct, %struct.a_struct* %5, i64 0, i32 1
  %7 = load i32, i32* %6, align 4
  %8 = icmp eq i32 %7, 0
  br i1 %8, label %9, label %10

; <label>:9                                       ; preds = %0
  store %struct.test_struct* %aStruct, %struct.test_struct** %backlog, align 8
  br label %10

; <label>:10                                      ; preds = %9, %0
  %11 = load %struct.test_struct*, %struct.test_struct** %backlog, align 8
  %12 = icmp eq %struct.test_struct* %11, null
  br i1 %12, label %14, label %13

; <label>:13                                      ; preds = %10
  br label %14

; <label>:14                                      ; preds = %10, %13
  ret i32 0
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).