[sledge] Fix bug in translation of ExtractElement InsertElement instructions

Summary: The length was computed using the wrong type.

Reviewed By: jvillard

Differential Revision: D27188309

fbshipit-source-id: 8a7e85dde
master
Josh Berdine 4 years ago committed by Facebook GitHub Bot
parent e32f5ef6bd
commit 5a81118e14

@ -666,9 +666,9 @@ and xlate_opcode : x -> Llvm.llvalue -> Llvm.Opcode.t -> Inst.t list * Exp.t
let lltyp = Llvm.type_of (Llvm.operand llv 0) in let lltyp = Llvm.type_of (Llvm.operand llv 0) in
let llelt = Llvm.element_type lltyp in let llelt = Llvm.element_type lltyp in
let elt = xlate_type x llelt in let elt = xlate_type x llelt in
let len = Llvm.vector_size llelt in let len = Llvm.vector_size lltyp in
let byts = size_of x lltyp in
let bits = bit_size_of x lltyp in let bits = bit_size_of x lltyp in
let byts = size_of x lltyp in
Typ.array ~elt ~len ~bits ~byts Typ.array ~elt ~len ~bits ~byts
in in
let idx i = let idx i =

Loading…
Cancel
Save