Index: lib/Target/ARM64/ARM64ISelLowering.cpp =================================================================== --- lib/Target/ARM64/ARM64ISelLowering.cpp +++ lib/Target/ARM64/ARM64ISelLowering.cpp @@ -45,9 +45,20 @@ cl::desc("Generate ARM64 tail calls (TEMPORARY OPTION)."), cl::init(true)); -static cl::opt -StrictAlign("arm64-strict-align", cl::Hidden, - cl::desc("Disallow all unaligned memory accesses")); +enum AlignMode { + StrictAlign, + NoStrictAlign +}; + +static cl::opt +Align(cl::desc("Load/store alignment support"), + cl::Hidden, cl::init(NoStrictAlign), + cl::values( + clEnumValN(StrictAlign, "arm64-strict-align", + "Disallow all unaligned memory accesses"), + clEnumValN(NoStrictAlign, "arm64-no-strict-align", + "Allow unaligned memory accesses"), + clEnumValEnd)); // Place holder until extr generation is tested fully. static cl::opt @@ -372,7 +383,7 @@ setDivIsWellDefined(true); - RequireStrictAlign = StrictAlign; + RequireStrictAlign = (Align == StrictAlign); setHasExtractBitsInsn(true);