23 lines · plain
1; RUN: opt -global-merge -global-merge-max-offset=100 -global-merge-on-const -S < %s | FileCheck %s2; RUN: opt -global-merge -global-merge-max-offset=100 -global-merge-on-const -global-merge-all-const -S < %s | FileCheck %s --check-prefix=AGGRESSIVE3; RUN: opt -passes='global-merge<max-offset=100;merge-const>' -S < %s | FileCheck %s4; RUN: opt -passes='global-merge<max-offset=100;merge-const;merge-const-aggressive>' -S < %s | FileCheck %s --check-prefix=AGGRESSIVE5 6; CHECK: @_MergedGlobals = private constant <{ i32, i32 }> <{ i32 1, i32 2 }>, align 47; AGGRESSIVE: @_MergedGlobals = private constant <{ i32, i32, i32 }> <{ i32 1, i32 2, i32 3 }>, align 48 9@a = internal constant i32 110@b = internal constant i32 211@c = internal constant i32 312 13define void @use() {14 %a = load i32, ptr @a15 %b = load i32, ptr @b16 ret void17}18 19define void @use2() {20 %c = load i32, ptr @c21 ret void22}23