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) / Address=#x40

Source:
ptr %res = pointer(non-local, block_id=1, offset=0) / Address=#x40
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: 4	alloc type: 0	alive: true	address: 64
Block 2 >	size: 1	align: 8	alloc type: 2	alive: false	address: 8
Block 3 >	size: 15	align: 2	alloc type: 0	alive: true	address: 12

Target:
ptr %res = pointer(non-local, block_id=1, offset=0) / Address=#x40
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_888i40AM_mWKq.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:     18 (56.2%)
Num UNSAT:   14 (43.8%)
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