fix loop-vectorize for llvm-3.3

This commit is contained in:
Siu Kwan Lam 2013-11-05 16:58:20 -06:00
commit 8a6dd7af7f
4 changed files with 37 additions and 5 deletions

View file

@ -64,7 +64,8 @@ def build_manual_vector():
def build_auto_vector():
mod = lc.Module.new('auto.vector')
intty = lc.Type.int(32)
# Loop vectorize is sensitive to the size of the index size(!?)
intty = lc.Type.int(tuple.__itemsize__ * 8)
aryty = lc.Type.pointer(lc.Type.float())
fnty = lc.Type.function(lc.Type.void(), [aryty, aryty, aryty, intty])
fn = mod.add_function(fnty, name='vector_add')