[LLVMdev] Possible DAGCombiner or TargetData Bug

David Greene dag at cray.com
Wed Feb 18 17:30:58 PST 2009


On Wednesday 18 February 2009 18:49, David Greene wrote:

> Hmm...why is the ABI alignment for VectorTyID 16?  The ABI certainly
> doesn't guarantee it.  It only guarantees it for __int128, __float128 and
> __m128. Lots of other types can map to <2 x i64>.

I should mention this is x86-64.  The data layout for x86-64 doesn't even 
mention vector types, so the default from TargetData gets used, which is
to set VECTOR_ALIGN to 16 for preferred and ABI alignment:

class X86Subtarget : public TargetSubtarget {

[...]

  std::string getDataLayout() const {
    const char *p;
    if (is64Bit())
      p = "e-p:64:64-s:64-f64:64:64-i64:64:64-f80:128:128";
    else {
      if (isTargetDarwin())
        p = "e-p:32:32-f64:32:64-i64:32:64-f80:128:128";
      else
        p = "e-p:32:32-f64:32:64-i64:32:64-f80:32:32";
    }
    return std::string(p);
  }

So maybe the problem is here?

                                              -Dave



More information about the llvm-dev mailing list