Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function test1(x)
- y = 2.0
- u = 2.320
- x < 0 && (u = 32.0)
- x > 1 && (u = 1.0)
- return u + y
- end
- function test2(x)
- y = 2.0
- u = 2.320
- u = x < 0 ? 32.0 : u
- u = x > 1 ? 1.0 : u
- return u + y
- end
- @code_llvm test1(2.2)
- ; Function Attrs: uwtable
- define double @julia_test1_71850(double) #0 {
- top:
- %1 = fcmp uge double %0, 0.000000e+00
- br i1 %1, label %L, label %if
- L: ; preds = %if, %top
- %u.0 = phi double [ 2.320000e+00, %top ], [ 3.200000e+01, %if ]
- %2 = fcmp ule double %0, 1.000000e+00
- br i1 %2, label %L1, label %if2
- L1: ; preds = %if2, %L
- %u.1 = phi double [ %u.0, %L ], [ 1.000000e+00, %if2 ]
- %3 = fadd double %u.1, 2.000000e+00
- ret double %3
- if: ; preds = %top
- br label %L
- if2: ; preds = %L
- br label %L1
- }
- @code_llvm test2(2.2)
- ; Function Attrs: uwtable
- define double @julia_test2_71853(double) #0 {
- top:
- %1 = fcmp uge double %0, 0.000000e+00
- br i1 %1, label %L2, label %if
- L2: ; preds = %top, %if
- %"#temp#.sroa.0.0" = phi i64 [ 4629700416936869888, %if ], [ 4612406594367767183, %top ]
- %2 = fcmp ule double %0, 1.000000e+00
- br i1 %2, label %L4, label %if5
- L4: ; preds = %L2, %if5
- %"#temp#1.sroa.0.0" = phi i64 [ 4607182418800017408, %if5 ], [ %"#temp#.sroa.0.0", %L2 ]
- %.cast = bitcast i64 %"#temp#1.sroa.0.0" to double
- %3 = fadd double %.cast, 2.000000e+00
- ret double %3
- if: ; preds = %top
- br label %L2
- if5: ; preds = %L2
- br label %L4
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement