; based on inline decision, so post inline counts are accurate.
;; The order of nodes within Context Profile Tree depends on the implmementation of std::hash<std::string>.
-;; Mark it fail on AIX for now before we figure out a solution.
-; XFAIL: system-aix
+;; Using check-dag instead of check-next.
; Note that we need new pass manager to enable top-down processing for sample profile loader
; INLINE-ALL-NEXT: Marking context profile as inlined: main:3 @ _Z5funcAi:1 @ _Z8funcLeafi
; INLINE-ALL-NEXT: Getting callee context for instr: %call.i1 = tail call i32 @_Z3fibi
; INLINE-ALL-NEXT: Getting callee context for instr: %call5.i = tail call i32 @_Z3fibi
-; INLINE-ALL-NEXT: Getting base profile for function: _Z5funcBi
-; INLINE-ALL-NEXT: Merging context profile into base profile: _Z5funcBi
-; INLINE-ALL-NEXT: Found context tree root to promote: external:10 @ _Z5funcBi
-; INLINE-ALL-NEXT: Context promoted to: _Z5funcBi
-; INLINE-ALL-NEXT: Found context tree root to promote: main:3.1 @ _Z5funcBi
-; INLINE-ALL-NEXT: Context promoted and merged to: _Z5funcBi
-; INLINE-ALL-NEXT: Context promoted to: _Z5funcBi:1 @ _Z8funcLeafi
-; INLINE-ALL-NEXT: Found context tree root to promote: externalA:17 @ _Z5funcBi
-; INLINE-ALL-NEXT: Context promoted and merged to: _Z5funcBi
-; INLINE-ALL-NEXT: Getting callee context for instr: %call = tail call i32 @_Z8funcLeafi
-; INLINE-ALL-NEXT: Callee context found: _Z5funcBi:1 @ _Z8funcLeafi
-; INLINE-ALL-NEXT: Marking context profile as inlined: _Z5funcBi:1 @ _Z8funcLeafi
-; INLINE-ALL-NEXT: Getting callee context for instr: %call.i = tail call i32 @_Z3fibi
-; INLINE-ALL-NEXT: Getting callee context for instr: %call5.i = tail call i32 @_Z3fibi
-; INLINE-ALL-NEXT: Getting base profile for function: _Z5funcAi
-; INLINE-ALL-NEXT: Merging context profile into base profile: _Z5funcAi
-; INLINE-ALL-NEXT: Getting base profile for function: _Z8funcLeafi
+; INLINE-ALL-DAG: Getting base profile for function: _Z5funcAi
+; INLINE-ALL-DAG-NEXT: Merging context profile into base profile: _Z5funcAi
+; INLINE-ALL-DAG: Getting base profile for function: _Z5funcBi
+; INLINE-ALL-DAG-NEXT: Merging context profile into base profile: _Z5funcBi
+; INLINE-ALL-DAG-NEXT: Found context tree root to promote: external:10 @ _Z5funcBi
+; INLINE-ALL-DAG-NEXT: Context promoted to: _Z5funcBi
+; INLINE-ALL-DAG-NEXT: Found context tree root to promote: main:3.1 @ _Z5funcBi
+; INLINE-ALL-DAG-NEXT: Context promoted and merged to: _Z5funcBi
+; INLINE-ALL-DAG-NEXT: Context promoted to: _Z5funcBi:1 @ _Z8funcLeafi
+; INLINE-ALL-DAG-NEXT: Found context tree root to promote: externalA:17 @ _Z5funcBi
+; INLINE-ALL-DAG-NEXT: Context promoted and merged to: _Z5funcBi
+; INLINE-ALL-DAG-NEXT: Getting callee context for instr: %call = tail call i32 @_Z8funcLeafi
+; INLINE-ALL-DAG-NEXT: Callee context found: _Z5funcBi:1 @ _Z8funcLeafi
+; INLINE-ALL-DAG-NEXT: Marking context profile as inlined: _Z5funcBi:1 @ _Z8funcLeafi
+; INLINE-ALL-DAG-NEXT: Getting callee context for instr: %call.i = tail call i32 @_Z3fibi
+; INLINE-ALL-DAG-NEXT: Getting callee context for instr: %call5.i = tail call i32 @_Z3fibi
+; INLINE-ALL: Getting base profile for function: _Z8funcLeafi
; INLINE-ALL-NEXT: Merging context profile into base profile: _Z8funcLeafi
; Test we inlined the following in top-down order and promot rest not inlined context profile into base profile
; INLINE-HOT-NEXT: Callee context found: main:3.1 @ _Z5funcBi
; INLINE-HOT-NEXT: Getting callee context for instr: %call1 = tail call i32 @_Z5funcAi
; INLINE-HOT-NEXT: Callee context found: main:3 @ _Z5funcAi
-; INLINE-HOT-NEXT: Getting base profile for function: _Z5funcBi
-; INLINE-HOT-NEXT: Merging context profile into base profile: _Z5funcBi
-; INLINE-HOT-NEXT: Found context tree root to promote: external:10 @ _Z5funcBi
-; INLINE-HOT-NEXT: Context promoted to: _Z5funcBi
-; INLINE-HOT-NEXT: Found context tree root to promote: main:3.1 @ _Z5funcBi
-; INLINE-HOT-NEXT: Context promoted and merged to: _Z5funcBi
-; INLINE-HOT-NEXT: Context promoted to: _Z5funcBi:1 @ _Z8funcLeafi
-; INLINE-HOT-NEXT: Found context tree root to promote: externalA:17 @ _Z5funcBi
-; INLINE-HOT-NEXT: Context promoted and merged to: _Z5funcBi
-; INLINE-HOT-NEXT: Getting callee context for instr: %call = tail call i32 @_Z8funcLeafi
-; INLINE-HOT-NEXT: Callee context found: _Z5funcBi:1 @ _Z8funcLeafi
-; INLINE-HOT-NEXT: Marking context profile as inlined: _Z5funcBi:1 @ _Z8funcLeafi
-; INLINE-HOT-NEXT: Getting callee context for instr: %call.i = tail call i32 @_Z3fibi
-; INLINE-HOT-NEXT: Getting callee context for instr: %call5.i = tail call i32 @_Z3fibi
-; INLINE-HOT-NEXT: Getting base profile for function: _Z5funcAi
-; INLINE-HOT-NEXT: Merging context profile into base profile: _Z5funcAi
-; INLINE-HOT-NEXT: Found context tree root to promote: main:3 @ _Z5funcAi
-; INLINE-HOT-NEXT: Context promoted to: _Z5funcAi
-; INLINE-HOT-NEXT: Context promoted to: _Z5funcAi:1 @ _Z8funcLeafi
-; INLINE-HOT-NEXT: Getting callee context for instr: %call = tail call i32 @_Z8funcLeafi(i32 %add), !dbg !50
-; INLINE-HOT-NEXT: Callee context found: _Z5funcAi:1 @ _Z8funcLeafi
-; INLINE-HOT-NEXT: Marking context profile as inlined: _Z5funcAi:1 @ _Z8funcLeafi
-; INLINE-HOT-NEXT: Getting callee context for instr: %call.i = tail call i32 @_Z3fibi(i32 %tmp.i) #2, !dbg !62
-; INLINE-HOT-NEXT: Getting callee context for instr: %call5.i = tail call i32 @_Z3fibi(i32 %tmp1.i) #2, !dbg !69
-; INLINE-HOT-NEXT: Getting base profile for function: _Z8funcLeafi
+; INLINE-HOT-DAG: Getting base profile for function: _Z5funcAi
+; INLINE-HOT-DAG-NEXT: Merging context profile into base profile: _Z5funcAi
+; INLINE-HOT-DAG-NEXT: Found context tree root to promote: main:3 @ _Z5funcAi
+; INLINE-HOT-DAG-NEXT: Context promoted to: _Z5funcAi
+; INLINE-HOT-DAG-NEXT: Context promoted to: _Z5funcAi:1 @ _Z8funcLeafi
+; INLINE-HOT-DAG-NEXT: Getting callee context for instr: %call = tail call i32 @_Z8funcLeafi(i32 %add), !dbg !50
+; INLINE-HOT-DAG-NEXT: Callee context found: _Z5funcAi:1 @ _Z8funcLeafi
+; INLINE-HOT-DAG-NEXT: Marking context profile as inlined: _Z5funcAi:1 @ _Z8funcLeafi
+; INLINE-HOT-DAG-NEXT: Getting callee context for instr: %call.i = tail call i32 @_Z3fibi(i32 %tmp.i) #2, !dbg !62
+; INLINE-HOT-DAG-NEXT: Getting callee context for instr: %call5.i = tail call i32 @_Z3fibi(i32 %tmp1.i) #2, !dbg !69
+; INLINE-HOT-DAG: Getting base profile for function: _Z5funcBi
+; INLINE-HOT-DAG-NEXT: Merging context profile into base profile: _Z5funcBi
+; INLINE-HOT-DAG-NEXT: Found context tree root to promote: external:10 @ _Z5funcBi
+; INLINE-HOT-DAG-NEXT: Context promoted to: _Z5funcBi
+; INLINE-HOT-DAG-NEXT: Found context tree root to promote: main:3.1 @ _Z5funcBi
+; INLINE-HOT-DAG-NEXT: Context promoted and merged to: _Z5funcBi
+; INLINE-HOT-DAG-NEXT: Context promoted to: _Z5funcBi:1 @ _Z8funcLeafi
+; INLINE-HOT-DAG-NEXT: Found context tree root to promote: externalA:17 @ _Z5funcBi
+; INLINE-HOT-DAG-NEXT: Context promoted and merged to: _Z5funcBi
+; INLINE-HOT-DAG-NEXT: Getting callee context for instr: %call = tail call i32 @_Z8funcLeafi
+; INLINE-HOT-DAG-NEXT: Callee context found: _Z5funcBi:1 @ _Z8funcLeafi
+; INLINE-HOT-DAG-NEXT: Marking context profile as inlined: _Z5funcBi:1 @ _Z8funcLeafi
+; INLINE-HOT-DAG-NEXT: Getting callee context for instr: %call.i = tail call i32 @_Z3fibi
+; INLINE-HOT-DAG-NEXT: Getting callee context for instr: %call5.i = tail call i32 @_Z3fibi
+; INLINE-HOT: Getting base profile for function: _Z8funcLeafi
; INLINE-HOT-NEXT: Merging context profile into base profile: _Z8funcLeafi