Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/Transforms/FunctionAttrs/nosync.ll
Show All 22 Lines | |||||
; TEST 1 | ; TEST 1 | ||||
; non-convergent and readnone implies nosync | ; non-convergent and readnone implies nosync | ||||
%struct.RT = type { i8, [10 x [20 x i32]], i8 } | %struct.RT = type { i8, [10 x [20 x i32]], i8 } | ||||
%struct.ST = type { i32, double, %struct.RT } | %struct.ST = type { i32, double, %struct.RT } | ||||
; FNATTR: Function Attrs: norecurse nounwind optsize readnone ssp uwtable | ; FNATTR: Function Attrs: norecurse nounwind optsize readnone ssp uwtable | ||||
; FNATTR-NEXT: define nonnull i32* @foo(%struct.ST* readnone %s) | ; FNATTR-NEXT: define nonnull i32* @foo(%struct.ST* readnone %s) | ||||
; ATTRIBUTOR: Function Attrs: nofree nosync nounwind optsize readnone ssp uwtable | ; ATTRIBUTOR: Function Attrs: nofree nosync nounwind optsize readnone ssp uwtable | ||||
; ATTRIBUTOR-NEXT: define i32* @foo(%struct.ST* %s) | ; ATTRIBUTOR-NEXT: define nonnull i32* @foo(%struct.ST* %s) | ||||
define i32* @foo(%struct.ST* %s) nounwind uwtable readnone optsize ssp { | define i32* @foo(%struct.ST* %s) nounwind uwtable readnone optsize ssp { | ||||
entry: | entry: | ||||
%arrayidx = getelementptr inbounds %struct.ST, %struct.ST* %s, i64 1, i32 2, i32 1, i64 5, i64 13 | %arrayidx = getelementptr inbounds %struct.ST, %struct.ST* %s, i64 1, i32 2, i32 1, i64 5, i64 13 | ||||
ret i32* %arrayidx | ret i32* %arrayidx | ||||
} | } | ||||
; TEST 2 | ; TEST 2 | ||||
; atomic load with monotonic ordering | ; atomic load with monotonic ordering | ||||
▲ Show 20 Lines • Show All 313 Lines • Show Last 20 Lines |