jckarter/clay — Issue #234: simd codegen bug
Author: jckarter
Created: 2012-03-03 23:07:59+00:00
State: open
Labels: x86

```
main() {
var a = Vec[Byte, 16](1uss);
for (i in range(8)) { println(a); a = a+a; }
}
```

outputs:

```
Vec[UInt8, 16](1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
Vec[UInt8, 16](64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64)
Vec[UInt8, 16](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Vec[UInt8, 16](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Vec[UInt8, 16](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Vec[UInt8, 16](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Vec[UInt8, 16](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Vec[UInt8, 16](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
```

prints the expected 1,2,4,etc. with -O0, might be an LLVM bug