Test Failure: Transforms/CodeGenPrepare/revert-constant-ptr-propagation-on-calls.ll

Test source: git

Log:

Source: <stdin>
-- 1. RequireAnalysisPass<ProfileSummaryAnalysis, Module> : Skipping NOP
ERROR: Unsupported instruction:   %guard = load atomic i8, ptr @guard acquire, align 8
-- 2. RequireAnalysisPass<ProfileSummaryAnalysis, Module> : Skipping NOP
ERROR: Unsupported instruction:   %guard = load atomic i8, ptr @guard acquire, align 8
-- 3. ModuleToFunctionPassAdaptor
ERROR: Unsupported instruction:   %guard = load atomic i8, ptr @guard acquire, align 8

----------------------------------------
@g_getS = global 1 bytes, align 1
@g_getX = global 4 bytes, align 1

define ptr @getS_or_getX(i1 %cond) {
entry:
  %result = select i1 %cond, ptr @g_getS, ptr @g_getX
  ret ptr %result
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
@g_getS = global 1 bytes, align 1

define ptr @getS_weak_function() {
entry:
  ret ptr @g_getS
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
@g_getS = global 1 bytes, align 1

define ptr @getS_linkonce_odr_function() {
entry:
  ret ptr @g_getS
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
declare ptr @getS()
declare i32 @S_getI(ptr)

@g_getS = global 1 bytes, align 1

define i32 @caller_1() {
#0:
  %getS_ptr = call ptr @getS()
  %getI = call i32 @S_getI(ptr @g_getS)
  ret i32 %getI
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
declare ptr @getS()
declare i32 @S_getI(ptr)

define i32 @caller_2() {
entry:
  %getS_ptr = call ptr @getS()
  br label %use

use:
  %getI = call i32 @S_getI(ptr %getS_ptr)
  ret i32 %getI
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
declare i32 @S_getI(ptr)
declare ptr @getS()

@g_getS = global 1 bytes, align 1

define i32 @caller_3() {
entry:
  %getI = call i32 @S_getI(ptr @g_getS)
  %getS_ptr = call ptr @getS()
  ret i32 %getI
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
declare ptr @getS_or_getX(i1)
declare i32 @S_getI(ptr)

@g_getS = global 1 bytes, align 1

define i32 @caller_4(i1 %cond) {
#0:
  %getS_or_getX_ptr = call ptr @getS_or_getX(i1 %cond)
  %getI = call i32 @S_getI(ptr @g_getS)
  ret i32 %getI
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
declare ptr @getS_weak_function()
declare i32 @S_getI(ptr)

@g_getS = global 1 bytes, align 1

define i32 @caller_5() {
#0:
  %getS_ptr = call ptr @getS_weak_function()
  %getI = call i32 @S_getI(ptr @g_getS)
  ret i32 %getI
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
declare ptr @getS_dec()
declare i32 @S_getI(ptr)

@g_getS = global 1 bytes, align 1

define i32 @caller_6() {
#0:
  %getS_ptr = call ptr @getS_dec()
  %getI = call i32 @S_getI(ptr @g_getS)
  ret i32 %getI
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
declare ptr @getS_dllimport_function()
declare i32 @S_getI(ptr)

@g_getS = global 1 bytes, align 1

define i32 @caller_7() {
#0:
  %getS_ptr = call ptr @getS_dllimport_function()
  %getI = call i32 @S_getI(ptr @g_getS)
  ret i32 %getI
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
declare ptr @getS_linkonce_odr_function()
declare i32 @S_getI(ptr)

@g_getS = global 1 bytes, align 1

define i32 @caller_8() {
#0:
  %getS_ptr = call ptr @getS_linkonce_odr_function()
  %getI = call i32 @S_getI(ptr @g_getS)
  ret i32 %getI
}
Transformation seems to be correct! (syntactically equal)

-- 1. PassManager<Function> : Skipping NOP
ERROR: Unsupported instruction:   %guard = load atomic i8, ptr @guard acquire, align 8
-- 2. CodeGenPreparePass
ERROR: Unsupported instruction:   %guard = load atomic i8, ptr @guard acquire, align 8
-- 3. CodeGenPreparePass
ERROR: Unsupported instruction:   %guard = load atomic i8, ptr @guard acquire, align 8
-- 4. PassManager<Function> : Skipping NOP
ERROR: Unsupported instruction:   %guard = load atomic i8, ptr @guard acquire, align 8
-- 5. PassManager<Function> : Skipping NOP
-- 6. CodeGenPreparePass

----------------------------------------
@g_getS = global 1 bytes, align 1
@g_getX = global 4 bytes, align 1

define ptr @getS_or_getX(i1 %cond) {
entry:
  %result = select i1 %cond, ptr @g_getS, ptr @g_getX
  ret ptr %result
}
Transformation seems to be correct! (syntactically equal)

-- 7. CodeGenPreparePass

----------------------------------------
@g_getS = global 1 bytes, align 1
@g_getX = global 4 bytes, align 1

define ptr @getS_or_getX(i1 %cond) {
entry:
  %result = select i1 %cond, ptr @g_getS, ptr @g_getX
  ret ptr %result
}
Transformation seems to be correct! (syntactically equal)

-- 8. PassManager<Function> : Skipping NOP
-- 9. PassManager<Function> : Skipping NOP
-- 10. CodeGenPreparePass

----------------------------------------
@g_getS = global 1 bytes, align 1

define ptr @getS_weak_function() {
entry:
  ret ptr @g_getS
}
Transformation seems to be correct! (syntactically equal)

-- 11. CodeGenPreparePass

----------------------------------------
@g_getS = global 1 bytes, align 1

define ptr @getS_weak_function() {
entry:
  ret ptr @g_getS
}
Transformation seems to be correct! (syntactically equal)

-- 12. PassManager<Function> : Skipping NOP
-- 13. PassManager<Function> : Skipping NOP
-- 14. CodeGenPreparePass

----------------------------------------
@g_getS = global 1 bytes, align 1

define ptr @getS_linkonce_odr_function() {
entry:
  ret ptr @g_getS
}
Transformation seems to be correct! (syntactically equal)

-- 15. CodeGenPreparePass

----------------------------------------
@g_getS = global 1 bytes, align 1

define ptr @getS_linkonce_odr_function() {
entry:
  ret ptr @g_getS
}
Transformation seems to be correct! (syntactically equal)

-- 16. PassManager<Function> : Skipping NOP
-- 17. PassManager<Function> : Skipping NOP
-- 18. CodeGenPreparePass

----------------------------------------
declare ptr @getS()
declare i32 @S_getI(ptr)

@g_getS = global 1 bytes, align 1

define i32 @caller_1() {
#0:
  %getS_ptr = call ptr @getS()
  %getI = call i32 @S_getI(ptr @g_getS)
  ret i32 %getI
}
Transformation seems to be correct! (syntactically equal)

-- 19. CodeGenPreparePass

----------------------------------------
declare ptr @getS()
declare i32 @S_getI(ptr)

@g_getS = global 1 bytes, align 1

define i32 @caller_1() {
#0:
  %getS_ptr = call ptr @getS()
  %getI = call i32 @S_getI(ptr @g_getS)
  ret i32 %getI
}
=>
declare ptr @getS()
declare i32 @S_getI(ptr)

@g_getS = global 1 bytes, align 1

define i32 @caller_1() {
#0:
  %getS_ptr = call ptr @getS()
  %getI = call i32 @S_getI(ptr %getS_ptr)
  ret i32 %getI
}
Transformation doesn't verify! (unsound)
ERROR: Source is more defined than target

Example:

Source:
ptr %getS_ptr = null
i32 %getI = function did not return!

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0	alive: false	address: 0
Block 1 >	size: 1	align: 1	alloc type: 0	alive: true	address: 10
Contents:
poison

Block 2 >	size: 1	align: 1	alloc type: 0	alive: true	address: 6
Block 3 >	size: 1	align: 1	alloc type: 0	alive: true	address: 2

Target:
ptr %getS_ptr = null
i32 %getI = function did not return!


Pass: CodeGenPreparePass
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=require<profile-summary>,function(codegenprepare)' '-mtriple=aarch64-none-linux-gnu' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'
Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_2uNurZLI_vpY7.bc"


------------------- SMT STATS -------------------
Num queries: 19
Num invalid: 0
Num skips:   0
Num trivial: 2 (9.5%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     16 (84.2%)
Num UNSAT:   3 (15.8%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh -S -passes='require<profile-summary>,function(codegenprepare)' -mtriple=aarch64-none-linux-gnu < /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/revert-constant-ptr-propagation-on-calls.ll | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/revert-constant-ptr-propagation-on-calls.ll
+ /home/nlopes/alive2/build/opt-alive.sh -S '-passes=require<profile-summary>,function(codegenprepare)' -mtriple=aarch64-none-linux-gnu
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/revert-constant-ptr-propagation-on-calls.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/revert-constant-ptr-propagation-on-calls.ll

 

<-- Back