Skip to content

Commit 31d37ba

Browse files
Merge pull request #29 from JuliaSIMD/os/remove-IfElse
remove IfElse.jl
2 parents 6b61976 + 0382812 commit 31d37ba

File tree

4 files changed

+27
-40
lines changed

4 files changed

+27
-40
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
matrix:
1212
version:
1313
- '1'
14-
- '1.5'
15-
- 'nightly'
14+
- 'lts'
15+
- 'pre'
1616
os:
1717
- ubuntu-latest
1818
arch:

.github/workflows/Downstream.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- 1
2323
- 4
2424
- 10
25-
julia-version: [1,1.6]
25+
julia-version: [1,'lts','pre']
2626
os: [ubuntu-latest]
2727
package:
2828
- {user: JuliaSIMD, repo: LoopVectorization.jl, group: Interface}

Project.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ version = "0.2.2"
66
[deps]
77
BitTwiddlingConvenienceFunctions = "62783981-4cbd-42fc-bca8-16325de8dc4b"
88
CPUSummary = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9"
9-
IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
109
Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
1110
ThreadingUtilities = "8290d209-cae3-49c0-8002-c8c24d57dab5"
1211

1312
[compat]
13+
Aqua = "0.8"
1414
BitTwiddlingConvenienceFunctions = "0.1"
1515
CPUSummary = "0.1.2, 0.2"
16-
IfElse = "0.1"
17-
Static = "0.3.1, 0.4, 0.5, 0.6, 0.7, 0.8, 1"
18-
ThreadingUtilities = "0.4.5, 0.5"
19-
julia = "1.5"
16+
Static = "1"
17+
Test = "<0.1, 1.10"
18+
ThreadingUtilities = "0.5"
19+
julia = "1.10"
2020

2121
[extras]
2222
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"

src/PolyesterWeave.jl

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,28 @@ end
77
using BitTwiddlingConvenienceFunctions: nextpow2
88
using ThreadingUtilities: _atomic_store!, _atomic_or!, _atomic_xchg!
99
using Static
10-
using IfElse: ifelse
1110

1211
export request_threads, free_threads!
1312

14-
@static if VERSION v"1.6.0-DEV.674"
15-
@inline function assume(b::Bool)
16-
Base.llvmcall(
17-
(
18-
"""
19-
declare void @llvm.assume(i1)
20-
21-
define void @entry(i8 %byte) alwaysinline {
22-
top:
23-
%bit = trunc i8 %byte to i1
24-
call void @llvm.assume(i1 %bit)
25-
ret void
26-
}
27-
""",
28-
"entry"
29-
),
30-
Cvoid,
31-
Tuple{Bool},
32-
b
33-
)
34-
end
35-
else
36-
@inline assume(b::Bool) = Base.llvmcall(
37-
(
38-
"declare void @llvm.assume(i1)",
39-
"%b = trunc i8 %0 to i1\ncall void @llvm.assume(i1 %b)\nret void"
40-
),
41-
Cvoid,
42-
Tuple{Bool},
43-
b
44-
)
13+
@inline function assume(b::Bool)
14+
Base.llvmcall(
15+
(
16+
"""
17+
declare void @llvm.assume(i1)
18+
19+
define void @entry(i8 %byte) alwaysinline {
20+
top:
21+
%bit = trunc i8 %byte to i1
22+
call void @llvm.assume(i1 %bit)
23+
ret void
24+
}
25+
""",
26+
"entry"
27+
),
28+
Cvoid,
29+
Tuple{Bool},
30+
b
31+
)
4532
end
4633

4734
const WORKERS = Ref{NTuple{8,UInt64}}(ntuple(((zero UInt64)), Val(8)))

0 commit comments

Comments
 (0)