From d25519ef0f4a7efa32b5a2cb1ff56002afa8cc65 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Sun, 7 Jun 2020 04:59:14 -0700 Subject: [PATCH] [sledge] Refactor: Simplify frontend check for unimplemented vector operations Reviewed By: ngorogiannis Differential Revision: D21720970 fbshipit-source-id: 5c5e87a70 --- sledge/bin/frontend.ml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sledge/bin/frontend.ml b/sledge/bin/frontend.ml index 9c72b01c9..c6e74cb2f 100644 --- a/sledge/bin/frontend.ml +++ b/sledge/bin/frontend.ml @@ -470,11 +470,6 @@ and xlate_opcode stk : x -> Llvm.llvalue -> Llvm.Opcode.t -> Exp.t = ; let xlate_rand i = xlate_value stk x (Llvm.operand llv i) in let typ = lazy (xlate_type x (Llvm.type_of llv)) in - let check_vector = - lazy - ( if Poly.equal (Llvm.classify_type (Llvm.type_of llv)) Vector then - todo "vector operations: %a" pp_llvalue llv () ) - in let convert opcode = let dst = Lazy.force typ in let rand = Llvm.operand llv 0 in @@ -491,7 +486,8 @@ and xlate_opcode stk : x -> Llvm.llvalue -> Llvm.Opcode.t -> Exp.t = | _ -> fail "convert: %a" pp_llvalue llv () in let binary (mk : ?typ:_ -> _) = - Lazy.force check_vector ; + if Poly.equal (Llvm.classify_type (Llvm.type_of llv)) Vector then + todo "vector operations: %a" pp_llvalue llv () ; let typ = xlate_type x (Llvm.type_of (Llvm.operand llv 0)) in mk ~typ (xlate_rand 0) (xlate_rand 1) in