Differential D46201 Diff 149977 test/Transforms/LoopInterchange/loop-interchange-optimization-remarks.ll

# Changeset View

Changeset View

# Standalone View

Standalone View

# test/Transforms/LoopInterchange/loop-interchange-optimization-remarks.ll

Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | 46 | for.inc17: | |||
---|---|---|---|---|---|

50 | br i1 %exitcond38, label %for.end19, label %for.body3.lr.ph | 50 | br i1 %exitcond38, label %for.end19, label %for.body3.lr.ph | ||

51 | 51 | | |||

52 | for.end19: | 52 | for.end19: | ||

53 | ret void | 53 | ret void | ||

54 | } | 54 | } | ||

55 | 55 | | |||

56 | ; CHECK: --- !Missed | 56 | ; CHECK: --- !Missed | ||

57 | ; CHECK-NEXT: Pass: loop-interchange | 57 | ; CHECK-NEXT: Pass: loop-interchange | ||

58 | ; CHECK-NEXT: Name: Dependence | 58 | ; CHECK-NEXT: Name: InterchangeNotProfitable | ||

59 | ; CHECK-NEXT: Function: test01 | 59 | ; CHECK-NEXT: Function: test01 | ||

60 | ; CHECK-NEXT: Args: | | |||

61 | ; CHECK-NEXT: - String: Cannot interchange loops due to dependences. | | |||

62 | ; CHECK-NEXT: ... | | |||

63 | 60 | | |||

64 | ;;--------------------------------------Test case 02------------------------------------ | 61 | ;;--------------------------------------Test case 02------------------------------------ | ||

65 | ;; [FIXME] This loop though valid is currently not interchanged due to the | 62 | ;; [FIXME] This loop though valid is currently not interchanged due to the | ||

66 | ;; limitation that we cannot split the inner loop latch due to multiple use of inner induction | 63 | ;; limitation that we cannot split the inner loop latch due to multiple use of inner induction | ||

67 | ;; variable.(used to increment the loop counter and to access A[j+1][i+1] | 64 | ;; variable.(used to increment the loop counter and to access A[j+1][i+1] | ||

68 | ;; for(int i=0;i<N-1;i++) | 65 | ;; for(int i=0;i<N-1;i++) | ||

69 | ;; for(int j=1;j<N-1;j++) | 66 | ;; for(int j=1;j<N-1;j++) | ||

70 | ;; A[j+1][i+1] = A[j+1][i+1] + k; | 67 | ;; A[j+1][i+1] = A[j+1][i+1] + k; | ||

Show All 31 Lines | 90 | for.body4: | |||

102 | br i1 %exitcond, label %for.cond.loopexit, label %for.body4 | 99 | br i1 %exitcond, label %for.cond.loopexit, label %for.body4 | ||

103 | 100 | | |||

104 | for.end17: | 101 | for.end17: | ||

105 | ret void | 102 | ret void | ||

106 | } | 103 | } | ||

107 | 104 | | |||

108 | ; CHECK: --- !Missed | 105 | ; CHECK: --- !Missed | ||

109 | ; CHECK-NEXT: Pass: loop-interchange | 106 | ; CHECK-NEXT: Pass: loop-interchange | ||

110 | ; CHECK-NEXT: Name: Dependence | 107 | ; CHECK-NEXT: Name: UnsupportedInsBetweenInduction | ||

111 | ; CHECK-NEXT: Function: test02 | 108 | ; CHECK-NEXT: Function: test02 | ||

112 | ; CHECK-NEXT: Args: | | |||

113 | ; CHECK-NEXT: - String: Cannot interchange loops due to dependences. | | |||

114 | ; CHECK-NEXT: ... | | |||

115 | 109 | | |||

116 | ;;-----------------------------------Test case 03------------------------------- | 110 | ;;-----------------------------------Test case 03------------------------------- | ||

117 | ;; Test to make sure we can handle output dependencies. | 111 | ;; Test to make sure we can handle output dependencies. | ||

118 | ;; | 112 | ;; | ||

119 | ;; for (int i = 0; i < 2; ++i) | 113 | ;; for (int i = 0; i < 2; ++i) | ||

120 | ;; for(int j = 0; j < 3; ++j) { | 114 | ;; for(int j = 0; j < 3; ++j) { | ||

121 | ;; A[j][i] = i; | 115 | ;; A[j][i] = i; | ||

122 | ;; A[j][i+1] = j; | 116 | ;; A[j][i+1] = j; | ||

▲ Show 20 Lines • Show All 82 Lines • ▼ Show 20 Line(s) | 195 | for.inc15: | |||

205 | br i1 %exitcond36, label %for.end17, label %for.body | 199 | br i1 %exitcond36, label %for.end17, label %for.body | ||

206 | 200 | | |||

207 | for.end17: | 201 | for.end17: | ||

208 | ret void | 202 | ret void | ||

209 | } | 203 | } | ||

210 | 204 | | |||

211 | ; CHECK: --- !Missed | 205 | ; CHECK: --- !Missed | ||

212 | ; CHECK-NEXT: Pass: loop-interchange | 206 | ; CHECK-NEXT: Pass: loop-interchange | ||

213 | ; CHECK-NEXT: Name: Dependence | 207 | ; CHECK-NEXT: Name: NotTightlyNested | ||

214 | ; CHECK-NEXT: Function: test04 | 208 | ; CHECK-NEXT: Function: test04 | ||

215 | ; CHECK-NEXT: Args: | | |||

216 | ; CHECK-NEXT: - String: Cannot interchange loops due to dependences. | | |||

217 | ; CHECK-NEXT: ... | |