Displaying 6 results from an estimated 6 matches for "__may_alias__".
2008 Oct 14
2
[LLVMdev] Making GEP into vector illegal?
...ate
> workaround with a union, though.
Hum what's your take on this then:
/* The Intel API is flexible enough that we must allow aliasing with
other
vector types, and their scalar components. */
/* APPLE LOCAL 4505813 */
typedef long long __m64 __attribute__ ((__vector_size__ (8),
__may_alias__));
:-)
2008 Oct 15
0
[LLVMdev] Making GEP into vector illegal?
...gh.
>
> Hum what's your take on this then:
>
> /* The Intel API is flexible enough that we must allow aliasing with
> other
> vector types, and their scalar components. */
> /* APPLE LOCAL 4505813 */
> typedef long long __m64 __attribute__ ((__vector_size__ (8),
> __may_alias__));
This is actually completely different AFAIK, this allows things like:
((float*)&myvec4)[2]
which is exactly what the proposal wants to continue supporting in the
IR.
-Chris
2009 Jul 25
2
[LLVMdev] GCC DejaGNU regressions
The GCC DejaGNU testsuite has discovered some regressions. Here's
one; this was reduced from testsuite/gcc.apple/4656532.c:
typedef long long __m64 __attribute__ ((__vector_size__ (8),
__may_alias__));
static __inline __m64 __attribute__((__always_inline__, __nodebug__))
_mm_slli_si64 (__m64 __m, int __count) {
}
__m64 x, y;
void t1(int n) {
y = _mm_slli_si64(x, n);
}
Compiled with LLVM-GCC (v76963) on Darwin/x86, this generates an ICE
in the GCC/LLVM conversion layer.
Here's anot...
2008 Oct 15
3
[LLVMdev] Making GEP into vector illegal?
...s your take on this then:
>>
>> /* The Intel API is flexible enough that we must allow aliasing with
>> other
>> vector types, and their scalar components. */
>> /* APPLE LOCAL 4505813 */
>> typedef long long __m64 __attribute__ ((__vector_size__ (8),
>> __may_alias__));
>
> This is actually completely different AFAIK,
That statement was that:
> float4 a;
> float* ptr_z = (float*)(&a) + 3;
``violates strict aliasing``
That assertion is wrong. The docs says:
@item may_alias
Accesses to objects with types with this attribute are not subjected...
2008 Oct 14
0
[LLVMdev] Making GEP into vector illegal?
On Tue, Oct 14, 2008 at 1:34 PM, Daniel M Gessel <gessel at apple.com> wrote:
> In Joe programmer language (i.e. C ;) ), are we basically talking
> about disallowing:
>
> float4 a;
> float* ptr_z = &a.z;
>
> ?
That's my reading as well; the argument for not allowing it is just to
make optimization easier. We don't allow addressing individual bits
either,
2008 Oct 14
4
[LLVMdev] Making GEP into vector illegal?
In Joe programmer language (i.e. C ;) ), are we basically talking
about disallowing:
float4 a;
float* ptr_z = &a.z;
?
Won't programmers just resort to:
float4 a;
float* ptr_z = (float*)(&a) + 3;
?
On Oct 14, 2008, at 3:55 PM, Mon Ping Wang wrote:
> Hi,
>
> Something like a sequential type makes sense especially in light of
> what Duncan is point out. I agree