Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<llvm::Function> : Skipping NOP -- 2. IRNormalizerPass ---------------------------------------- define void @foo() { #0: ret void } Transformation seems to be correct! (syntactically equal) -- 3. IRNormalizerPass ---------------------------------------- define void @foo() { #0: ret void } => define void @foo() { bb17254: ret void } Transformation seems to be correct! -- 4. PassManager<llvm::Function> : Skipping NOP -- 5. PassManager<llvm::Function> : Skipping NOP -- 6. IRNormalizerPass ---------------------------------------- define void @empty_basic_block() { exit: ret void } Transformation seems to be correct! (syntactically equal) -- 7. IRNormalizerPass ---------------------------------------- define void @empty_basic_block() { exit: ret void } Transformation seems to be correct! (syntactically equal) -- 8. PassManager<llvm::Function> : Skipping NOP -- 9. PassManager<llvm::Function> : Skipping NOP -- 10. IRNormalizerPass ---------------------------------------- declare void @effecting() define void @call_effecting() { #0: %#1 = add i32 0, 1 call void @effecting() ret void } Transformation seems to be correct! (syntactically equal) -- 11. IRNormalizerPass ---------------------------------------- declare void @effecting() define void @call_effecting() { #0: call void @effecting() ret void } => declare void @effecting() define void @call_effecting() { bb15160: call void @effecting() ret void } Transformation seems to be correct! -- 12. PassManager<llvm::Function> : Skipping NOP -- 13. PassManager<llvm::Function> : Skipping NOP -- 14. IRNormalizerPass ---------------------------------------- declare void @effecting() define void @dont_move_above_phi() { #0: br label %exit exit: %#1 = phi i32 [ 0, %#0 ] call void @effecting() ret void } Transformation seems to be correct! (syntactically equal) -- 15. IRNormalizerPass ---------------------------------------- declare void @effecting() define void @dont_move_above_phi() { #0: br label %exit exit: call void @effecting() ret void } => declare void @effecting() define void @dont_move_above_phi() { bb76951: br label %exit exit: call void @effecting() ret void } Transformation seems to be correct! -- 16. PassManager<llvm::Function> : Skipping NOP -- 17. PassManager<llvm::Function> : Skipping NOP -- 18. IRNormalizerPass ---------------------------------------- declare void @effecting() define void @dont_move_above_alloca() { #0: %#1 = alloca i64 4, align 4 call void @effecting() ret void } Transformation seems to be correct! (syntactically equal) -- 19. IRNormalizerPass ---------------------------------------- declare void @effecting() define void @dont_move_above_alloca() { #0: %#1 = alloca i64 4, align 4 call void @effecting() ret void } => declare void @effecting() define void @dont_move_above_alloca() { bb15160: %#0 = alloca i64 4, align 4 call void @effecting() ret void } Transformation seems to be correct! -- 20. PassManager<llvm::Function> : Skipping NOP -- 21. PassManager<llvm::Function> : Skipping NOP -- 22. IRNormalizerPass ---------------------------------------- declare void @effecting() declare void @effecting1() define void @dont_reorder_effecting() { #0: call void @effecting() call void @effecting1() ret void } Transformation seems to be correct! (syntactically equal) -- 23. IRNormalizerPass ---------------------------------------- declare void @effecting() declare void @effecting1() define void @dont_reorder_effecting() { #0: call void @effecting() call void @effecting1() ret void } => declare void @effecting() declare void @effecting1() define void @dont_reorder_effecting() { bb10075: call void @effecting() call void @effecting1() ret void } Transformation seems to be correct! -- 24. PassManager<llvm::Function> : Skipping NOP -- 25. PassManager<llvm::Function> : Skipping NOP -- 26. IRNormalizerPass ---------------------------------------- declare void @effecting2(i32) define void @dont_reorder_effecting1() { #0: %one = add i32 1, 1 %two = add i32 2, 2 call void @effecting2(i32 %one) call void @effecting2(i32 %two) ret void } Transformation seems to be correct! (syntactically equal) -- 27. IRNormalizerPass ---------------------------------------- declare void @effecting2(i32) define void @dont_reorder_effecting1() { #0: %one = add i32 1, 1 %two = add i32 2, 2 call void @effecting2(i32 %one) call void @effecting2(i32 %two) ret void } => declare void @effecting2(i32) define void @dont_reorder_effecting1() { bb10075: %one = add i32 1, 1 call void @effecting2(i32 %one) %two = add i32 2, 2 call void @effecting2(i32 %two) ret void } Transformation seems to be correct! -- 28. PassManager<llvm::Function> : Skipping NOP -- 29. PassManager<llvm::Function> : Skipping NOP -- 30. IRNormalizerPass ---------------------------------------- declare void @effecting2(i32) define void @dont_reorder_across_blocks() { #0: %one = add i32 1, 1 br label %exit exit: call void @effecting2(i32 %one) ret void } Transformation seems to be correct! (syntactically equal) -- 31. IRNormalizerPass ---------------------------------------- declare void @effecting2(i32) define void @dont_reorder_across_blocks() { #0: %one = add i32 1, 1 br label %exit exit: call void @effecting2(i32 %one) ret void } => declare void @effecting2(i32) define void @dont_reorder_across_blocks() { bb76951: %one = add i32 1, 1 br label %exit exit: call void @effecting2(i32 %one) ret void } Transformation seems to be correct! -- 32. PassManager<llvm::Function> : Skipping NOP -- 33. PassManager<llvm::Function> : Skipping NOP -- 34. IRNormalizerPass ---------------------------------------- define void @independentldst(ptr %a, ptr %b) { #0: %#1 = load i32, ptr %a, align 4 %#2 = load i32, ptr %b, align 4 store i32 %#2, ptr %a, align 4 store i32 %#1, ptr %b, align 4 ret void } Transformation seems to be correct! (syntactically equal) -- 35. IRNormalizerPass ---------------------------------------- define void @independentldst(ptr %a, ptr %b) { #0: %#1 = load i32, ptr %a, align 4 %#2 = load i32, ptr %b, align 4 store i32 %#2, ptr %a, align 4 store i32 %#1, ptr %b, align 4 ret void } => define void @independentldst(ptr %a, ptr %b) { bb10495: %vl12961(%b) = load i32, ptr %b, align 4 store i32 %vl12961(%b), ptr %a, align 4 %vl89528(%a) = load i32, ptr %a, align 4 store i32 %vl89528(%a), ptr %b, align 4 ret void } Transformation doesn't verify! (unsound) ERROR: Mismatch in memory Example: ptr %a = pointer(non-local, block_id=1, offset=0) / Address=#x0c ptr %b = pointer(non-local, block_id=2, offset=0) / Address=#x08 Source: i32 %#1 = #x00002000 (8192) i32 %#2 = #x00000000 (0) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 4 alloc type: 0 alive: false address: 0 Block 1 > size: 9 align: 2 alloc type: 0 alive: true address: 12 Contents: 0: #x00002000 *: poison Block 2 > size: 4 align: 1 alloc type: 0 alive: true address: 8 Contents: *: #x00000000 Target: i32 %vl12961(%b) = #x00000000 (0) i32 %vl89528(%a) = #x00000000 (0) Mismatch in pointer(non-local, block_id=2, offset=0) Source value: #x00002000 Target value: #x00000000 Pass: IRNormalizerPass Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-S' '-passes=normalize' '-verify-each' '-norm-rename-all=false' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats' Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_WHy8siLa_YwYj.bc" ------------------- SMT STATS ------------------- Num queries: 59 Num invalid: 0 Num skips: 0 Num trivial: 53 (47.3%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 42 (71.2%) Num UNSAT: 17 (28.8%) Alive2: Transform doesn't verify; aborting!
RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh -S -passes=normalize -verify-each -norm-rename-all=false < /bitbucket/nlopes/llvm/llvm/test/Transforms/IRNormalizer/reordering.ll | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/IRNormalizer/reordering.ll + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/IRNormalizer/reordering.ll + /home/nlopes/alive2/build/opt-alive.sh -S -passes=normalize -verify-each -norm-rename-all=false FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/IRNormalizer/reordering.ll