Test Failure: Transforms/InferAlignment/attributes.ll

Test source: git

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
-- 1. PassManager<Function> : Skipping NOP
-- 2. InferAlignmentPass

----------------------------------------
define void @attribute(ptr align(32) %a) {
#0:
  %load = load i32, ptr align(32) %a, align 1
  store i32 123, ptr align(32) %a, align 1
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 3. InferAlignmentPass

----------------------------------------
define void @attribute(ptr align(32) %a) {
#0:
  %load = load i32, ptr align(32) %a, align 32
  store i32 123, ptr align(32) %a, align 32
  ret void
}
=>
define void @attribute(ptr align(32) %a) {
#0:
  %load = load i32, ptr align(32) %a, align 32
  store i32 123, ptr align(32) %a, align 32
  ret void
}
Transformation seems to be correct!

-- 4. PassManager<Function> : Skipping NOP
-- 5. PassManager<Function> : Skipping NOP
-- 6. InferAlignmentPass

----------------------------------------
declare ptr @call(returned ptr)

define void @attribute_through_call(ptr align(32) %a) {
#0:
  %res = call ptr @call(returned ptr align(32) %a)
  %load = load i32, ptr %res, align 1
  store i32 123, ptr %res, align 1
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 7. InferAlignmentPass

----------------------------------------
declare ptr @call(returned ptr)

define void @attribute_through_call(ptr align(32) %a) {
#0:
  %res = call ptr @call(returned ptr align(32) %a)
  %load = load i32, ptr %res, align 1
  store i32 123, ptr %res, align 1
  ret void
}
=>
declare ptr @call(returned ptr)

define void @attribute_through_call(ptr align(32) %a) {
#0:
  %res = call ptr @call(returned ptr align(32) %a)
  %load = load i32, ptr %res, align 32
  store i32 123, ptr %res, align 32
  ret void
}
Transformation doesn't verify! (unsound)
ERROR: Source is more defined than target

Example:
ptr align(32) %a = pointer(non-local, block_id=1, offset=0)

Source:
ptr %res = pointer(non-local, block_id=1, offset=0)
i32 %load = poison

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0	alive: false	address: 0
Block 1 >	size: 4	align: 32	alloc type: 0	alive: true	address: 32
Block 2 >	size: 2	align: 1	alloc type: 0	alive: true	address: 1
Block 3 >	size: 1	align: 1	alloc type: 0	alive: true

Target:
ptr %res = pointer(non-local, block_id=1, offset=0)
i32 %load = UB triggered!


Pass: InferAlignmentPass
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' '-passes=infer-alignment' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'
Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_1TRhCqBt_dJUD.bc"


------------------- SMT STATS -------------------
Num queries: 32
Num invalid: 0
Num skips:   0
Num trivial: 8 (20.0%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     19 (59.4%)
Num UNSAT:   13 (40.6%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InferAlignment/attributes.ll -passes=infer-alignment -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InferAlignment/attributes.ll
+ /home/nlopes/alive2/build/opt-alive.sh -passes=infer-alignment -S
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InferAlignment/attributes.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InferAlignment/attributes.ll

 

<-- Back