Polly test and example

Hi, all

I tried Polly installation on Ubuntu.

On its building, it returned no errors.
But when I run "make polly-test", it returns 11 unexpected failures as
follows.

Hi, all

I tried Polly installation on Ubuntu.

On its building, it returned no errors.
But when I run "make polly-test", it returns 11 unexpected failures as
follows.
-----------------------------------
********************
Testing Time: 19.77s
********************
Failing Tests (11):
     Polly :: CodeGen/do_pluto_matmult.ll
     Polly :: CodeGen/loop_with_condition.ll
     Polly :: CodeGen/loop_with_condition_2.ll
     Polly :: CodeGen/loop_with_condition_ineq.ll
     Polly :: CodeGen/loop_with_condition_nested.ll
     Polly :: CodeGen/reduction_2.ll
     Polly :: CodeGen/sequential_loops.ll
     Polly :: CodeGen/single_do_loop_int_max_iterations.ll
     Polly :: CodeGen/single_do_loop_scev_replace.ll
     Polly :: CodeGen/single_loop.ll
     Polly :: CodeGen/single_loop_param.ll

Interesting. On what kind of Platform are you running this? Is it still Ubuntu 11.04? I assume it's an intel platform, but is it a 32-bit or 64bit?

The test cases that are failing are the ones that use 'lli' to execute the generated program. There seems to be something wrong in respect to lli. Can you run e.g. single_loop.ll with llvm-lit (-v) and show the error message.

And another question, I want to try "examples".
http://polly.grosser.es/examples.html

But I can't get its source files by 403.
http://polly.grosser.es/experiments/matmul/

Ups. I forgot to update this. It should now work.

Tobi

H, Tobias
Thank you for your reply.

Tobias Grosser wrote:
(Thu, 09 Jun 2011 15:41:05 -0300)

Hi, all

I tried Polly installation on Ubuntu.

On its building, it returned no errors.
But when I run "make polly-test", it returns 11 unexpected failures as
follows.
-----------------------------------
********************
Testing Time: 19.77s
********************
Failing Tests (11):
     Polly :: CodeGen/do_pluto_matmult.ll
     Polly :: CodeGen/loop_with_condition.ll
     Polly :: CodeGen/loop_with_condition_2.ll
     Polly :: CodeGen/loop_with_condition_ineq.ll
     Polly :: CodeGen/loop_with_condition_nested.ll
     Polly :: CodeGen/reduction_2.ll
     Polly :: CodeGen/sequential_loops.ll
     Polly :: CodeGen/single_do_loop_int_max_iterations.ll
     Polly :: CodeGen/single_do_loop_scev_replace.ll
     Polly :: CodeGen/single_loop.ll
     Polly :: CodeGen/single_loop_param.ll

Interesting. On what kind of Platform are you running this? Is it still
Ubuntu 11.04? I assume it's an intel platform, but is it a 32-bit or 64bit?

It is a little bit complicated.

Intel Core i5 M520.
Ubuntu 11.04-i386 using VMWare Player on Windows 7 Professional(64bit).

The test cases that are failing are the ones that use 'lli' to execute
the generated program. There seems to be something wrong in respect to
lli. Can you run e.g. single_loop.ll with llvm-lit (-v) and show the
error message.

OK. This is the message.

H, Tobias
Thank you for your reply.

Tobias Grosser wrote:

Interesting. On what kind of Platform are you running this? Is it still
Ubuntu 11.04? I assume it's an intel platform, but is it a 32-bit or 64bit?

It is a little bit complicated.

Intel Core i5 M520.
Ubuntu 11.04-i386 using VMWare Player on Windows 7 Professional(64bit).

So it's 32bit.

The test cases that are failing are the ones that use 'lli' to execute
the generated program. There seems to be something wrong in respect to
lli. Can you run e.g. single_loop.ll with llvm-lit (-v) and show the
error message.

OK. This is the message.

--------
tomohiro@ubuntu:~/llvm/tools/polly/test/CodeGen$ llvm-lit -v single_loop.ll
llvm-lit: lit.cfg:94: note: using out-of-tree build at '/home/tomohiro/build/
tools/polly'
-- Testing: 1 tests, 2 threads --
FAIL: Polly :: CodeGen/single_loop.ll (1 of 1)
******************** TEST 'Polly :: CodeGen/single_loop.ll' FAILED *************
*******
Script:
--
opt -load /home/tomohiro/build/lib/LLVMPolly.so -basicaa -polly-prepare -polly
-region-simplify -scev-aa -polly-cloog -analyze< /home/tomohiro/llvm/tools/
polly/test/CodeGen/single_loop.ll | FileCheck /home/tomohiro/llvm/tools/polly/
test/CodeGen/single_loop.ll
opt -load /home/tomohiro/build/lib/LLVMPolly.so -basicaa -polly-prepare -polly
-region-simplify -scev-aa -polly-codegen< /home/tomohiro/llvm/tools/polly/test
/CodeGen/single_loop.ll | lli -
--
Exit Code: 139
Command Output (stderr):
--
Stack dump:
0. Program arguments: lli -
/home/tomohiro/build/tools/polly/test/CodeGen/Output/single_loop.ll.script: line
2: 3250 Done opt -load /home/tomohiro/build/lib/LLVMPolly.so
-basicaa -polly-prepare -polly-region-simplify -scev-aa -polly-codegen< /home/
tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll
       3251 Segmentation fault | lli -

Interesting. It seems lli is segfaulting. Can you try to use the following command?

opt -load /home/tomohiro/build/lib/LLVMPolly.so \
  -basicaa -polly-prepare -polly-region-simplify -scev-aa \
  -polly-codegen \
  /home/tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll \
  > llc - out.s && gcc out.s && ./a.out

This means we do not run the created LLVM-IR file with the lli JIT compiler, but use the llc compiler and than gcc to statically compile the binary.

In case this does not work, I will investigate this on an i386 machine. All our development machines are amd64 machines and I must admit we did not test too much on i386. So issues on those machines are not too unexpected. Though Raghesh runs i386. He may have seen such a problem before.

Cheers and thanks for your report
Tobi

(2011/06/10 13:25), Tobias Grosser wrote:

H, Tobias
Thank you for your reply.

Tobias Grosser wrote:

Interesting. On what kind of Platform are you running this? Is it still
Ubuntu 11.04? I assume it's an intel platform, but is it a 32-bit or
64bit?

It is a little bit complicated.

Intel Core i5 M520.
Ubuntu 11.04-i386 using VMWare Player on Windows 7 Professional(64bit).

So it's 32bit.

Certainly.

The test cases that are failing are the ones that use 'lli' to execute
the generated program. There seems to be something wrong in respect to
lli. Can you run e.g. single_loop.ll with llvm-lit (-v) and show the
error message.

OK. This is the message.

--------
tomohiro@ubuntu:~/llvm/tools/polly/test/CodeGen$ llvm-lit -v
single_loop.ll
llvm-lit: lit.cfg:94: note: using out-of-tree build at
'/home/tomohiro/build/
tools/polly'
-- Testing: 1 tests, 2 threads --
FAIL: Polly :: CodeGen/single_loop.ll (1 of 1)
******************** TEST 'Polly :: CodeGen/single_loop.ll' FAILED
*************
*******
Script:
--
opt -load /home/tomohiro/build/lib/LLVMPolly.so -basicaa
-polly-prepare -polly
-region-simplify -scev-aa -polly-cloog -analyze<
/home/tomohiro/llvm/tools/
polly/test/CodeGen/single_loop.ll | FileCheck
/home/tomohiro/llvm/tools/polly/
test/CodeGen/single_loop.ll
opt -load /home/tomohiro/build/lib/LLVMPolly.so -basicaa
-polly-prepare -polly
-region-simplify -scev-aa -polly-codegen<
/home/tomohiro/llvm/tools/polly/test
/CodeGen/single_loop.ll | lli -
--
Exit Code: 139
Command Output (stderr):
--
Stack dump:
0. Program arguments: lli -
/home/tomohiro/build/tools/polly/test/CodeGen/Output/single_loop.ll.script:
line
2: 3250 Done opt -load /home/tomohiro/build/lib/LLVMPolly.so
-basicaa -polly-prepare -polly-region-simplify -scev-aa
-polly-codegen< /home/
tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll
3251 Segmentation fault | lli -

Interesting. It seems lli is segfaulting. Can you try to use the
following command?

opt -load /home/tomohiro/build/lib/LLVMPolly.so \
-basicaa -polly-prepare -polly-region-simplify -scev-aa \
-polly-codegen \
/home/tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll \
> llc - out.s && gcc out.s && ./a.out

This means we do not run the created LLVM-IR file with the lli JIT
compiler, but use the llc compiler and than gcc to statically compile
the binary.

OK. This result is as follows.

tomohiro@ubuntu:~/llvm/tools/polly/test/CodeGen$ opt -load /home/tomohiro/build/lib/LLVMPolly.so \
> -basicaa -polly-prepare -polly-region-simplify -scev-aa \
> -polly-codegen \
> /home/tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll \
> > llc - out.s && gcc out.s && ./a.out
llc: Too many positional arguments specified!
Can specify at most 1 positional arguments: See: llc -help

In case this does not work, I will investigate this on an i386 machine.
All our development machines are amd64 machines and I must admit we did
not test too much on i386. So issues on those machines are not too
unexpected. Though Raghesh runs i386. He may have seen such a problem
before.

I see. I will try it amd64 version but now on VMWare.
I'm glad if you tell me your environment in detail.

(2011/06/10 13:25), Tobias Grosser wrote:

H, Tobias
Thank you for your reply.

Tobias Grosser wrote:

Interesting. On what kind of Platform are you running this? Is it still
Ubuntu 11.04? I assume it's an intel platform, but is it a 32-bit or
64bit?

It is a little bit complicated.

Intel Core i5 M520.
Ubuntu 11.04-i386 using VMWare Player on Windows 7 Professional(64bit).

So it's 32bit.

Certainly.

The test cases that are failing are the ones that use 'lli' to execute
the generated program. There seems to be something wrong in respect to
lli. Can you run e.g. single_loop.ll with llvm-lit (-v) and show the
error message.

OK. This is the message.

--------
tomohiro@ubuntu:~/llvm/tools/polly/test/CodeGen$ llvm-lit -v
single_loop.ll
llvm-lit: lit.cfg:94: note: using out-of-tree build at
'/home/tomohiro/build/
tools/polly'
-- Testing: 1 tests, 2 threads --
FAIL: Polly :: CodeGen/single_loop.ll (1 of 1)
******************** TEST 'Polly :: CodeGen/single_loop.ll' FAILED
*************
*******
Script:
--
opt -load /home/tomohiro/build/lib/LLVMPolly.so -basicaa
-polly-prepare -polly
-region-simplify -scev-aa -polly-cloog -analyze<
/home/tomohiro/llvm/tools/
polly/test/CodeGen/single_loop.ll | FileCheck
/home/tomohiro/llvm/tools/polly/
test/CodeGen/single_loop.ll
opt -load /home/tomohiro/build/lib/LLVMPolly.so -basicaa
-polly-prepare -polly
-region-simplify -scev-aa -polly-codegen<
/home/tomohiro/llvm/tools/polly/test
/CodeGen/single_loop.ll | lli -
--
Exit Code: 139
Command Output (stderr):
--
Stack dump:
0. Program arguments: lli -
/home/tomohiro/build/tools/polly/test/CodeGen/Output/single_loop.ll.script:

line
2: 3250 Done opt -load /home/tomohiro/build/lib/LLVMPolly.so
-basicaa -polly-prepare -polly-region-simplify -scev-aa
-polly-codegen< /home/
tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll
3251 Segmentation fault | lli -

Interesting. It seems lli is segfaulting. Can you try to use the
following command?

opt -load /home/tomohiro/build/lib/LLVMPolly.so \
-basicaa -polly-prepare -polly-region-simplify -scev-aa \
-polly-codegen \
/home/tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll \
> llc - out.s && gcc out.s && ./a.out

This means we do not run the created LLVM-IR file with the lli JIT
compiler, but use the llc compiler and than gcc to statically compile
the binary.

OK. This result is as follows.

tomohiro@ubuntu:~/llvm/tools/polly/test/CodeGen$ opt -load
/home/tomohiro/build/lib/LLVMPolly.so \
> -basicaa -polly-prepare -polly-region-simplify -scev-aa \
> -polly-codegen \
> /home/tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll \
> > llc - out.s && gcc out.s && ./a.out
llc: Too many positional arguments specified!
Can specify at most 1 positional arguments: See: llc -help

Sorry, the last line should be:

llc -o out.s && gcc out.s && ./a.out

In case this does not work, I will investigate this on an i386 machine.
All our development machines are amd64 machines and I must admit we did
not test too much on i386. So issues on those machines are not too
unexpected. Though Raghesh runs i386. He may have seen such a problem
before.

I see. I will try it amd64 version but now on VMWare.
I'm glad if you tell me your environment in detail.

Basically I have an Ubuntu amd64. So if you just want to go ahead with some experiments I would us an 64bit operating system. Running Polly on 64bit is possible (as raghesh did some work on this), but most probably our implementation is not yet 100% bug free on 64bit.

I just looked again at the lli test cases and they specifically contain amd64 bit target triples. So most probably executing them on a 32bit system will never work. If you want to stay with 32bit, I would try the example on the webpage (from scratch) without using the pregenerated LLVM-IR files. Let me know if/how this works.

Cheers and thanks for your testing
Tobi

(2011/06/10 14:01), Tobias Grosser wrote:

(2011/06/10 13:25), Tobias Grosser wrote:

H, Tobias
Thank you for your reply.

Tobias Grosser wrote:

Interesting. On what kind of Platform are you running this? Is it
still
Ubuntu 11.04? I assume it's an intel platform, but is it a 32-bit or
64bit?

It is a little bit complicated.

Intel Core i5 M520.
Ubuntu 11.04-i386 using VMWare Player on Windows 7 Professional(64bit).

So it's 32bit.

Certainly.

The test cases that are failing are the ones that use 'lli' to execute
the generated program. There seems to be something wrong in respect to
lli. Can you run e.g. single_loop.ll with llvm-lit (-v) and show the
error message.

OK. This is the message.

--------
tomohiro@ubuntu:~/llvm/tools/polly/test/CodeGen$ llvm-lit -v
single_loop.ll
llvm-lit: lit.cfg:94: note: using out-of-tree build at
'/home/tomohiro/build/
tools/polly'
-- Testing: 1 tests, 2 threads --
FAIL: Polly :: CodeGen/single_loop.ll (1 of 1)
******************** TEST 'Polly :: CodeGen/single_loop.ll' FAILED
*************
*******
Script:
--
opt -load /home/tomohiro/build/lib/LLVMPolly.so -basicaa
-polly-prepare -polly
-region-simplify -scev-aa -polly-cloog -analyze<
/home/tomohiro/llvm/tools/
polly/test/CodeGen/single_loop.ll | FileCheck
/home/tomohiro/llvm/tools/polly/
test/CodeGen/single_loop.ll
opt -load /home/tomohiro/build/lib/LLVMPolly.so -basicaa
-polly-prepare -polly
-region-simplify -scev-aa -polly-codegen<
/home/tomohiro/llvm/tools/polly/test
/CodeGen/single_loop.ll | lli -
--
Exit Code: 139
Command Output (stderr):
--
Stack dump:
0. Program arguments: lli -
/home/tomohiro/build/tools/polly/test/CodeGen/Output/single_loop.ll.script:

line
2: 3250 Done opt -load /home/tomohiro/build/lib/LLVMPolly.so
-basicaa -polly-prepare -polly-region-simplify -scev-aa
-polly-codegen< /home/
tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll
3251 Segmentation fault | lli -

Interesting. It seems lli is segfaulting. Can you try to use the
following command?

opt -load /home/tomohiro/build/lib/LLVMPolly.so \
-basicaa -polly-prepare -polly-region-simplify -scev-aa \
-polly-codegen \
/home/tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll \
> llc - out.s && gcc out.s && ./a.out

This means we do not run the created LLVM-IR file with the lli JIT
compiler, but use the llc compiler and than gcc to statically compile
the binary.

OK. This result is as follows.

tomohiro@ubuntu:~/llvm/tools/polly/test/CodeGen$ opt -load
/home/tomohiro/build/lib/LLVMPolly.so \
> -basicaa -polly-prepare -polly-region-simplify -scev-aa \
> -polly-codegen \
> /home/tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll \
> > llc - out.s && gcc out.s && ./a.out
llc: Too many positional arguments specified!
Can specify at most 1 positional arguments: See: llc -help

Sorry, the last line should be:
> llc -o out.s && gcc out.s && ./a.out

This is the corrected result.

tomohiro@ubuntu:~$ opt -load /home/tomohiro/build/lib/LLVMPolly.so \
> -basicaa -polly-prepare -polly-region-simplify -scev-aa \
> -polly-codegen \
> /home/tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll \
> > llc -o out.s && gcc out.s && ./a.out
out.s: Assembler messages:
out.s:8: Error: bad register name `%rsp'
out.s:9: Error: bad register name `%rsp)'
out.s:12: Error: invalid instruction suffix for `call'
out.s:14: Error: bad register name `%rax'
out.s:18: Error: bad register name `%rcx'
out.s:22: Error: bad register name `%rcx)'
out.s:23: Error: bad register name `%rsp,%rcx,4)'
out.s:24: Error: bad register name `%rdx'
out.s:29: Error: bad register name `%rax'
out.s:36: Error: bad register name `%rsp,%rax,4)'
out.s:39: Error: bad register name `%rsp)'
out.s:42: Error: bad register name `%rsp)'
out.s:44: Error: bad register name `%rsp)'
out.s:45: Error: bad register name `%rsp'
tomohiro@ubuntu:~$

In case this does not work, I will investigate this on an i386 machine.
All our development machines are amd64 machines and I must admit we did
not test too much on i386. So issues on those machines are not too
unexpected. Though Raghesh runs i386. He may have seen such a problem
before.

I see. I will try it amd64 version but now on VMWare.
I'm glad if you tell me your environment in detail.

Basically I have an Ubuntu amd64. So if you just want to go ahead with
some experiments I would us an 64bit operating system. Running Polly on
64bit is possible (as raghesh did some work on this), but most probably
our implementation is not yet 100% bug free on 64bit.

Thanks. I'll try it.

Hi,

out.s: Assembler messages:
out.s:8: Error: bad register name `%rsp'
out.s:9: Error: bad register name `%rsp)'
out.s:12: Error: invalid instruction suffix for `call'
out.s:14: Error: bad register name `%rax'
out.s:18: Error: bad register name `%rcx'
out.s:22: Error: bad register name `%rcx)'
out.s:23: Error: bad register name `%rsp,%rcx,4)'
out.s:24: Error: bad register name `%rdx'
out.s:29: Error: bad register name `%rax'
out.s:36: Error: bad register name `%rsp,%rax,4)'
out.s:39: Error: bad register name `%rsp)'
out.s:42: Error: bad register name `%rsp)'
out.s:44: Error: bad register name `%rsp)'
out.s:45: Error: bad register name `%rsp'
tomohiro@ubuntu:~$

llc compiled the test for 64-bit X86, and you're assembling with a 32-bit
assembler. Try the -m32 option.

Cheers,

James

Hi.

I see. I will try it amd64 version but now on VMWare.
I'm glad if you tell me your environment in detail.

As a result, I successfully ran "make polly-test" on Ubuntu amd64.

[100%] Running Polly regression tests
Testing Time: 13.16s
  Expected Passes : 113
  Expected Failures : 29
[100%] Built target polly-test

MORIYAMA Tomohiro wrote.
(Fri, 10 Jun 2011 14:57:37 +0900)

hi, James.
Thanks for your advice.

"James Molloy" wrote.
(Fri, 10 Jun 2011 08:38:44 +0100)

Hi,

out.s: Assembler messages:
out.s:8: Error: bad register name `%rsp'
out.s:9: Error: bad register name `%rsp)'
out.s:12: Error: invalid instruction suffix for `call'
out.s:14: Error: bad register name `%rax'
out.s:18: Error: bad register name `%rcx'
out.s:22: Error: bad register name `%rcx)'
out.s:23: Error: bad register name `%rsp,%rcx,4)'
out.s:24: Error: bad register name `%rdx'
out.s:29: Error: bad register name `%rax'
out.s:36: Error: bad register name `%rsp,%rax,4)'
out.s:39: Error: bad register name `%rsp)'
out.s:42: Error: bad register name `%rsp)'
out.s:44: Error: bad register name `%rsp)'
out.s:45: Error: bad register name `%rsp'
tomohiro@ubuntu:~$

llc compiled the test for 64-bit X86, and you're assembling with a 32-bit
assembler. Try the -m32 option.

I tried this option with 'llc -march=x86' as follows,

tomohiro@ubuntu:~/llvm/tools/polly/test/CodeGen$ opt -load /home/tomohiro/build/
lib/LLVMPolly.so \
  -basicaa -polly-prepare -polly-region-simplify -scev-aa \
   -polly-codegen \
   /home/tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll \
    > llc -march=x86 -o out.s && gcc -m32 out.s && ./a.out
tomohiro@ubuntu:~/build$

then it successfully ran.
So, on compiling llvm with Polly, is the suite of the tests are built as 64bit
files as the default?

Mh. We built several test cases from C files on an amd64 machine. Because of this the amd64 target triple is at the top of the several of the .ll files. Have a look at single_loop.ll:

target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"

As I believe there should not yet be any target specific stuff in the .ll files, you may try to just remove those two lines from the .ll file and run the test case again. Without the amd64 target triple it should be built automatically for the native architecture.

Cheers
Tobi

Nice. Thanks for testing.

Tobi

(2011/06/11 0:01), Tobias Grosser wrote:

hi, James.
Thanks for your advice.

"James Molloy" wrote.
(Fri, 10 Jun 2011 08:38:44 +0100)

Hi,

out.s: Assembler messages:
out.s:8: Error: bad register name `%rsp'
out.s:9: Error: bad register name `%rsp)'
out.s:12: Error: invalid instruction suffix for `call'
out.s:14: Error: bad register name `%rax'
out.s:18: Error: bad register name `%rcx'
out.s:22: Error: bad register name `%rcx)'
out.s:23: Error: bad register name `%rsp,%rcx,4)'
out.s:24: Error: bad register name `%rdx'
out.s:29: Error: bad register name `%rax'
out.s:36: Error: bad register name `%rsp,%rax,4)'
out.s:39: Error: bad register name `%rsp)'
out.s:42: Error: bad register name `%rsp)'
out.s:44: Error: bad register name `%rsp)'
out.s:45: Error: bad register name `%rsp'
tomohiro@ubuntu:~$

llc compiled the test for 64-bit X86, and you're assembling with a 32-bit
assembler. Try the -m32 option.

I tried this option with 'llc -march=x86' as follows,

tomohiro@ubuntu:~/llvm/tools/polly/test/CodeGen$ opt -load /home/tomohiro/build/
lib/LLVMPolly.so \
   -basicaa -polly-prepare -polly-region-simplify -scev-aa \
    -polly-codegen \
    /home/tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll \
     > llc -march=x86 -o out.s&& gcc -m32 out.s&& ./a.out
tomohiro@ubuntu:~/build$

then it successfully ran.
So, on compiling llvm with Polly, is the suite of the tests are built as 64bit
files as the default?

Mh. We built several test cases from C files on an amd64 machine. Because of this the amd64 target triple is at the top of the several of the .ll files. Have a look at single_loop.ll:

target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"

As I believe there should not yet be any target specific stuff in the .ll files, you may try to just remove those two lines from the .ll file and run the test case again. Without the amd64 target triple it should be built automatically for the native architecture.

I removed these two lines and run the test.
It ended with an error as follows:

tomohiro@ubuntu:~/llvm/tools/polly/test/CodeGen$ opt -load /home/tomohiro/build/lib/LLVMPolly.so \
> -basicaa -polly-prepare -polly-region-simplify -scev-aa \
> -polly-codegen \
> /home/tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll \
> > llc -o out.s&& gcc out.s&& ./a.out
LLVM ERROR: Bad TargetData ctor used. Tool did not specify a TargetData to use?
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
tomohiro@ubuntu:~/llvm/tools/polly/test/CodeGen$

Cheers
Tobi

Thanks.