diff --git a/test/CodeGen/EVM/runtime_tests/simple_test_7.ll b/test/CodeGen/EVM/runtime_tests/simple_test_7.ll new file mode 100644 index 0000000000000..0da2427c22893 --- /dev/null +++ b/test/CodeGen/EVM/runtime_tests/simple_test_7.ll @@ -0,0 +1,20 @@ +;; simple comparison +define i256 @abcd(i256 %a, i256 %b) { +entry: + %0 = alloca i256 + %1 = icmp ugt i256 %a, %b + br i1 %1, label %true, label %false + +true: + store i256 %a, i256* %0 + br label %finally + +false: + store i256 %b, i256* %0 + br label %finally + +finally: + %2 = load i256, i256* %0 + ret i256 %2 +} + diff --git a/tools/evm-test/evm_test.py b/tools/evm-test/evm_test.py index 090450bf7666c..a6851dcd81c16 100755 --- a/tools/evm-test/evm_test.py +++ b/tools/evm-test/evm_test.py @@ -12,6 +12,9 @@ template_x_1 = """ Start: + PUSH2 0x100 + PUSH1 0x40 + MSTORE PUSH1 Return ${pushes} PUSH2 Function @@ -28,6 +31,9 @@ template_x_0 = """ Start: + PUSH2 0x100 + PUSH1 0x40 + MSTORE PUSH1 Return ${pushes} PUSH2 Function @@ -201,6 +207,10 @@ def run_string_input(name: str, inputs: List[str], output: str, function: str) - "input": ["0x12345678", "0x87654321"], "output": "0x000000000000000000000000000000000000000000000000012345678", }, + "simple_test_7.ll" : { + "input": ["0x12345678", "0x87654321"], + "output": "0x000000000000000000000000000000000000000000000000087654321", + }, } def assembly_tests() -> List[str]: