Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/naive/armv8m/_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ def core(self, slothy):
slothy.optimize()


class IfElse(OptimizationRunner):
def __init__(self):
super().__init__("ifelse", base_dir="tests")

def core(self, slothy):
slothy.config.allow_useless_instructions = True
slothy.optimize(start="start", end="end")


test_instances = [
Instructions(),
Instructions(target=Target_CortexM85r1),
Expand All @@ -141,4 +150,5 @@ def core(self, slothy):
LoopLetp(),
HintTest(),
TagTest(),
IfElse(),
]
12 changes: 12 additions & 0 deletions tests/naive/armv8m/ifelse.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.equ RCxy_44, 14
.macro shift x, y
.if (RCxy_\x\()\y % 2) == 0
vshr.u32 q<SHR_l>, q<A_l>, #32-(RCxy_\x\()\y/2)
.else
unimp
.endif
.endm

start:
shift 4, 4
end:
Loading