Index: llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp =================================================================== --- llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp +++ llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp @@ -2572,7 +2572,7 @@ unsigned AArch64InstructionSelector::emitConstantPoolEntry(Constant *CPVal, MachineFunction &MF) const { - Type *CPTy = CPVal->getType()->getPointerTo(); + Type *CPTy = CPVal->getType(); unsigned Align = MF.getDataLayout().getPrefTypeAlignment(CPTy); if (Align == 0) Align = MF.getDataLayout().getTypeAllocSize(CPTy); Index: llvm/test/CodeGen/AArch64/GlobalISel/select-shuffle-vector.mir =================================================================== --- llvm/test/CodeGen/AArch64/GlobalISel/select-shuffle-vector.mir +++ llvm/test/CodeGen/AArch64/GlobalISel/select-shuffle-vector.mir @@ -82,7 +82,7 @@ ; CHECK-LABEL: name: shuffle_v4i32 ; CHECK: constants: ; CHECK: value: '<16 x i8> ' - ; CHECK: alignment: 8 + ; CHECK: alignment: 16 ; CHECK: isTargetSpecific: false ; CHECK: liveins: $q0, $q1 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0 @@ -117,7 +117,7 @@ ; CHECK-LABEL: name: shuffle_tbl_v4i32 ; CHECK: constants: ; CHECK: value: '<16 x i8> ' - ; CHECK: alignment: 8 + ; CHECK: alignment: 16 ; CHECK: isTargetSpecific: false ; CHECK: liveins: $q0, $q1 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0 @@ -153,7 +153,7 @@ ; CHECK-LABEL: name: shuffle_v2i64 ; CHECK: constants: ; CHECK: value: '<16 x i8> ' - ; CHECK: alignment: 8 + ; CHECK: alignment: 16 ; CHECK: isTargetSpecific: false ; CHECK: liveins: $q0, $q1 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0