Closed jw3126 closed 6 years ago
https://travis-ci.org/jw3126/Setfield.jl/jobs/420581842
hand
Body::StaticArrays.SArray{Tuple{2},Int64,1,2}
44 1 ── %1 = (Base.getfield)(#temp#, 1, true)::StaticArrays.SArray{Tuple{2},Int64,1,2}
│ %2 = (Base.getfield)(#temp#, 2, true)::Int64
│ %3 = (Base.getfield)(#temp#, 3, true)::Int64
└─── goto #7 if not true
2 ── %5 = (Base.slt_int)(%3, 1)::Bool
└─── goto #4 if not %5
3 ── goto #5
4 ── %8 = (Base.slt_int)(2, %3)::Bool
5 ┄─ %9 = φ (#3 => %5, #4 => %8)::Bool
└─── goto #7 if not %9
6 ── %11 = invoke StaticArrays.BoundsError(%1::Any, %3::Int64)::BoundsError
│ (StaticArrays.throw)(%11)
└─── $(Expr(:unreachable))
7 ── %14 = (1 === %3)::Bool
│ %15 = (Base.getfield)(%1, :data)::Tuple{Int64,Int64}
│ %16 = (Base.getfield)(%15, 1, true)::Int64
│ %17 = (StaticArrays.ifelse)(%14, %2, %16)::Int64
│ %18 = (2 === %3)::Bool
│ %19 = (Base.getfield)(%1, :data)::Tuple{Int64,Int64}
│ %20 = (Base.getfield)(%19, 2, true)::Int64
│ %21 = (StaticArrays.ifelse)(%18, %2, %20)::Int64
│ %22 = (StaticArrays.tuple)(%17, %21)::Tuple{Int64,Int64}
│ %23 = %new(StaticArrays.SArray{Tuple{2},Int64,1,2}, %22)::StaticArrays.SArray{Tuple{2},Int64,1,2}
└─── goto #9
8 ── $(Expr(:unreachable))
9 ┄─ goto #10
10 ─ return %23
lens
Body::StaticArrays.SArray{Tuple{2},Int64,1,2}
40 1 ── %1 = (Base.getfield)(#temp#, 1, true)::StaticArrays.SArray{Tuple{2},Int64,1,2}
│ %2 = (Base.getfield)(#temp#, 2, true)::Int64
│ %3 = (Base.getfield)(#temp#, 3, true)::Int64
└─── goto #7 if not true
2 ── %5 = (Base.slt_int)(%3, 1)::Bool
└─── goto #4 if not %5
3 ── goto #5
4 ── %8 = (Base.slt_int)(2, %3)::Bool
5 ┄─ %9 = φ (#3 => %5, #4 => %8)::Bool
└─── goto #7 if not %9
6 ── %11 = invoke StaticArrays.BoundsError(%1::Any, %3::Int64)::BoundsError
│ (StaticArrays.throw)(%11)
└─── $(Expr(:unreachable))
7 ── %14 = (1 === %3)::Bool
│ %15 = (Base.getfield)(%1, :data)::Tuple{Int64,Int64}
│ %16 = (Base.getfield)(%15, 1, true)::Int64
│ %17 = (StaticArrays.ifelse)(%14, %2, %16)::Int64
│ %18 = (2 === %3)::Bool
│ %19 = (Base.getfield)(%1, :data)::Tuple{Int64,Int64}
│ %20 = (Base.getfield)(%19, 2, true)::Int64
│ %21 = (StaticArrays.ifelse)(%18, %2, %20)::Int64
│ %22 = (StaticArrays.tuple)(%17, %21)::Tuple{Int64,Int64}
│ %23 = %new(StaticArrays.SArray{Tuple{2},Int64,1,2}, %22)::StaticArrays.SArray{Tuple{2},Int64,1,2}
└─── goto #9
8 ── $(Expr(:unreachable))
9 ┄─ goto #10
10 ─ goto #11
11 ─ return %23
I don't understand LLVM good enough, but to me it looks like:
store volatile i64 %43, i64* inttoptr (i64 140631686713344 to i64*), align 4096
pass: store volatile i64 %43, i64* inttoptr (i64 140530691822864 to i64*), align 16
These huge align values occur in both lens and hand version.
Codecov Report
100% <100%> (ø)
Continue to review full report at Codecov.