@@ -2890,7 +2890,9 @@ define i8 @phi_store() {
2890
2890
; IS__TUNIT_OPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 2
2891
2891
; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
2892
2892
; IS__TUNIT_OPM: end:
2893
- ; IS__TUNIT_OPM-NEXT: ret i8 1
2893
+ ; IS__TUNIT_OPM-NEXT: [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
2894
+ ; IS__TUNIT_OPM-NEXT: [[L:%.*]] = load i8, i8* [[S]], align 1
2895
+ ; IS__TUNIT_OPM-NEXT: ret i8 [[L]]
2894
2896
;
2895
2897
; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
2896
2898
; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_store
@@ -2907,7 +2909,9 @@ define i8 @phi_store() {
2907
2909
; IS__TUNIT_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 2
2908
2910
; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
2909
2911
; IS__TUNIT_NPM: end:
2910
- ; IS__TUNIT_NPM-NEXT: ret i8 1
2912
+ ; IS__TUNIT_NPM-NEXT: [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
2913
+ ; IS__TUNIT_NPM-NEXT: [[L:%.*]] = load i8, i8* [[S]], align 1
2914
+ ; IS__TUNIT_NPM-NEXT: ret i8 [[L]]
2911
2915
;
2912
2916
; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone
2913
2917
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_store
@@ -2924,7 +2928,9 @@ define i8 @phi_store() {
2924
2928
; IS__CGSCC_OPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 2
2925
2929
; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
2926
2930
; IS__CGSCC_OPM: end:
2927
- ; IS__CGSCC_OPM-NEXT: ret i8 1
2931
+ ; IS__CGSCC_OPM-NEXT: [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
2932
+ ; IS__CGSCC_OPM-NEXT: [[L:%.*]] = load i8, i8* [[S]], align 1
2933
+ ; IS__CGSCC_OPM-NEXT: ret i8 [[L]]
2928
2934
;
2929
2935
; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
2930
2936
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_store
@@ -2941,7 +2947,9 @@ define i8 @phi_store() {
2941
2947
; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 2
2942
2948
; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
2943
2949
; IS__CGSCC_NPM: end:
2944
- ; IS__CGSCC_NPM-NEXT: ret i8 1
2950
+ ; IS__CGSCC_NPM-NEXT: [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
2951
+ ; IS__CGSCC_NPM-NEXT: [[L:%.*]] = load i8, i8* [[S]], align 1
2952
+ ; IS__CGSCC_NPM-NEXT: ret i8 [[L]]
2945
2953
;
2946
2954
entry:
2947
2955
%a = alloca i16
@@ -2963,9 +2971,9 @@ end:
2963
2971
2964
2972
; FIXME: This function returns 1.
2965
2973
define i8 @phi_no_store_1 () {
2966
- ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind writeonly
2974
+ ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind
2967
2975
; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@phi_no_store_1
2968
- ; IS__TUNIT_OPM-SAME: () #[[ATTR6 ]] {
2976
+ ; IS__TUNIT_OPM-SAME: () #[[ATTR2 ]] {
2969
2977
; IS__TUNIT_OPM-NEXT: entry:
2970
2978
; IS__TUNIT_OPM-NEXT: br label [[LOOP:%.*]]
2971
2979
; IS__TUNIT_OPM: loop:
@@ -2976,11 +2984,14 @@ define i8 @phi_no_store_1() {
2976
2984
; IS__TUNIT_OPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3
2977
2985
; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
2978
2986
; IS__TUNIT_OPM: end:
2979
- ; IS__TUNIT_OPM-NEXT: ret i8 0
2987
+ ; IS__TUNIT_OPM-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2
2988
+ ; IS__TUNIT_OPM-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1
2989
+ ; IS__TUNIT_OPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]]
2990
+ ; IS__TUNIT_OPM-NEXT: ret i8 [[ADD]]
2980
2991
;
2981
- ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn writeonly
2992
+ ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
2982
2993
; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_no_store_1
2983
- ; IS__TUNIT_NPM-SAME: () #[[ATTR4 ]] {
2994
+ ; IS__TUNIT_NPM-SAME: () #[[ATTR2 ]] {
2984
2995
; IS__TUNIT_NPM-NEXT: entry:
2985
2996
; IS__TUNIT_NPM-NEXT: br label [[LOOP:%.*]]
2986
2997
; IS__TUNIT_NPM: loop:
@@ -2991,9 +3002,12 @@ define i8 @phi_no_store_1() {
2991
3002
; IS__TUNIT_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3
2992
3003
; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
2993
3004
; IS__TUNIT_NPM: end:
2994
- ; IS__TUNIT_NPM-NEXT: ret i8 0
3005
+ ; IS__TUNIT_NPM-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2
3006
+ ; IS__TUNIT_NPM-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1
3007
+ ; IS__TUNIT_NPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]]
3008
+ ; IS__TUNIT_NPM-NEXT: ret i8 [[ADD]]
2995
3009
;
2996
- ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly
3010
+ ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind
2997
3011
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_1
2998
3012
; IS__CGSCC_OPM-SAME: () #[[ATTR9:[0-9]+]] {
2999
3013
; IS__CGSCC_OPM-NEXT: entry:
@@ -3006,11 +3020,14 @@ define i8 @phi_no_store_1() {
3006
3020
; IS__CGSCC_OPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3
3007
3021
; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
3008
3022
; IS__CGSCC_OPM: end:
3009
- ; IS__CGSCC_OPM-NEXT: ret i8 0
3023
+ ; IS__CGSCC_OPM-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2
3024
+ ; IS__CGSCC_OPM-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1
3025
+ ; IS__CGSCC_OPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]]
3026
+ ; IS__CGSCC_OPM-NEXT: ret i8 [[ADD]]
3010
3027
;
3011
- ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
3028
+ ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
3012
3029
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_no_store_1
3013
- ; IS__CGSCC_NPM-SAME: () #[[ATTR4 ]] {
3030
+ ; IS__CGSCC_NPM-SAME: () #[[ATTR5 ]] {
3014
3031
; IS__CGSCC_NPM-NEXT: entry:
3015
3032
; IS__CGSCC_NPM-NEXT: br label [[LOOP:%.*]]
3016
3033
; IS__CGSCC_NPM: loop:
@@ -3021,7 +3038,10 @@ define i8 @phi_no_store_1() {
3021
3038
; IS__CGSCC_NPM-NEXT: [[C:%.*]] = icmp eq i8 [[O]], 3
3022
3039
; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[END:%.*]], label [[LOOP]]
3023
3040
; IS__CGSCC_NPM: end:
3024
- ; IS__CGSCC_NPM-NEXT: ret i8 0
3041
+ ; IS__CGSCC_NPM-NEXT: [[L11:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 2), align 2
3042
+ ; IS__CGSCC_NPM-NEXT: [[L12:%.*]] = load i8, i8* getelementptr (i8, i8* bitcast (i32* @a1 to i8*), i64 3), align 1
3043
+ ; IS__CGSCC_NPM-NEXT: [[ADD:%.*]] = add i8 [[L11]], [[L12]]
3044
+ ; IS__CGSCC_NPM-NEXT: ret i8 [[ADD]]
3025
3045
;
3026
3046
entry:
3027
3047
%b = bitcast i32* @a1 to i8*
@@ -3080,7 +3100,7 @@ define i8 @phi_no_store_2() {
3080
3100
;
3081
3101
; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind
3082
3102
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_2
3083
- ; IS__CGSCC_OPM-SAME: () #[[ATTR10:[0-9]+ ]] {
3103
+ ; IS__CGSCC_OPM-SAME: () #[[ATTR9 ]] {
3084
3104
; IS__CGSCC_OPM-NEXT: entry:
3085
3105
; IS__CGSCC_OPM-NEXT: br label [[LOOP:%.*]]
3086
3106
; IS__CGSCC_OPM: loop:
@@ -3162,7 +3182,7 @@ define i8 @phi_no_store_3() {
3162
3182
;
3163
3183
; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly
3164
3184
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_3
3165
- ; IS__CGSCC_OPM-SAME: () #[[ATTR9 ]] {
3185
+ ; IS__CGSCC_OPM-SAME: () #[[ATTR10:[0-9]+ ]] {
3166
3186
; IS__CGSCC_OPM-NEXT: entry:
3167
3187
; IS__CGSCC_OPM-NEXT: br label [[LOOP:%.*]]
3168
3188
; IS__CGSCC_OPM: loop:
@@ -3274,8 +3294,8 @@ end:
3274
3294
; IS__CGSCC_OPM: attributes #[[ATTR6]] = { argmemonly nofree norecurse nosync nounwind willreturn }
3275
3295
; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readonly willreturn }
3276
3296
; IS__CGSCC_OPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone }
3277
- ; IS__CGSCC_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind writeonly }
3278
- ; IS__CGSCC_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind }
3297
+ ; IS__CGSCC_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind }
3298
+ ; IS__CGSCC_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind writeonly }
3279
3299
; IS__CGSCC_OPM: attributes #[[ATTR11]] = { willreturn }
3280
3300
; IS__CGSCC_OPM: attributes #[[ATTR12]] = { nounwind willreturn writeonly }
3281
3301
; IS__CGSCC_OPM: attributes #[[ATTR13]] = { nounwind writeonly }
0 commit comments