File tree 2 files changed +8
-5
lines changed
rustc_target/src/abi/call
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -3060,9 +3060,10 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
3060
3060
// LLVM's definition of `noalias` is based solely on memory
3061
3061
// dependencies rather than pointer equality
3062
3062
//
3063
- // Due to miscompiles in LLVM < 12, we apply a separate NoAliasMutRef attribute
3064
- // for UniqueBorrowed arguments, so that the codegen backend can decide
3065
- // whether or not to actually emit the attribute.
3063
+ // Due to past miscompiles in LLVM, we apply a separate NoAliasMutRef attribute
3064
+ // for UniqueBorrowed arguments, so that the codegen backend can decide whether
3065
+ // or not to actually emit the attribute. It can also be controlled with the
3066
+ // `-Zmutable-noalias` debugging option.
3066
3067
let no_alias = match kind {
3067
3068
PointerKind :: Shared | PointerKind :: UniqueBorrowed => false ,
3068
3069
PointerKind :: UniqueOwned => true ,
Original file line number Diff line number Diff line change @@ -68,8 +68,10 @@ mod attr_impl {
68
68
const NonNull = 1 << 3 ;
69
69
const ReadOnly = 1 << 4 ;
70
70
const InReg = 1 << 5 ;
71
- // NoAlias on &mut arguments can only be used with LLVM >= 12 due to miscompiles
72
- // in earlier versions. FIXME: Remove this distinction once possible.
71
+ // Due to past miscompiles in LLVM, we use a separate attribute for
72
+ // &mut arguments, so that the codegen backend can decide whether
73
+ // or not to actually emit the attribute. It can also be controlled
74
+ // with the `-Zmutable-noalias` debugging option.
73
75
const NoAliasMutRef = 1 << 6 ;
74
76
}
75
77
}
You can’t perform that action at this time.
0 commit comments