Test Failure: Transforms/ExpandLargeFpConvert/X86/expand-large-fp-convert-fptoui129.ll

Test source: git

Log:

Source: <stdin>
ERROR: Unsupported type: x86_fp80

----------------------------------------
define i129 @halftoui129(half %a) {
#0:
  %conv = fptoui half %a to i129
  ret i129 %conv
}
=>
define i129 @halftoui129(half %a) {
#0:
  %#1 = fptoui half %a to i32
  %#2 = zext i32 %#1 to i129
  ret i129 %#2
}
Transformation seems to be correct!


----------------------------------------
define i129 @floattoui129(float %a) {
#0:
  %conv = fptoui float %a to i129
  ret i129 %conv
}
=>
define i129 @floattoui129(float %a) {
fp-to-i-entry:
  %#0 = bitcast float %a to i32
  %#1 = zext i32 %#0 to i129
  %#2 = icmp sgt i32 %#0, 4294967295
  %#3 = select i1 %#2, i129 1, i129 680564733841876926926749214863536422911
  %#4 = lshr i129 %#1, 23
  %#5 = and i129 %#4, 255
  %#6 = and i129 %#1, 8388607
  %#7 = or i129 %#6, 8388608
  %#8 = icmp ult i129 %#5, 127
  br i1 %#8, label %fp-to-i-cleanup, label %fp-to-i-if-end

fp-to-i-if-end:
  %#9 = add i129 %#5, 680564733841876926926749214863536422656
  %#10 = icmp ult i129 %#9, 680564733841876926926749214863536422783
  br i1 %#10, label %fp-to-i-if-then5, label %fp-to-i-if-end9

fp-to-i-if-then5:
  %#11 = select i1 %#2, i129 340282366920938463463374607431768211455, i129 340282366920938463463374607431768211456
  br label %fp-to-i-cleanup

fp-to-i-if-end9:
  %#12 = icmp ult i129 %#5, 150
  br i1 %#12, label %fp-to-i-if-then12, label %fp-to-i-if-else

fp-to-i-if-then12:
  %#13 = sub i129 150, %#5
  %#14 = lshr i129 %#7, %#13
  %#15 = mul i129 %#14, %#3
  br label %fp-to-i-cleanup

fp-to-i-if-else:
  %#16 = add i129 %#5, 680564733841876926926749214863536422762
  %#17 = shl i129 %#7, %#16
  %#18 = mul i129 %#17, %#3
  br label %fp-to-i-cleanup

fp-to-i-cleanup:
  %#19 = phi i129 [ %#11, %fp-to-i-if-then5 ], [ %#15, %fp-to-i-if-then12 ], [ %#18, %fp-to-i-if-else ], [ 0, %fp-to-i-entry ]
  ret i129 %#19
}
Transformation doesn't verify! (unsound)
ERROR: Source is more defined than target

Example:
float %a = poison

Source:
i129 %conv = poison

Target:
i32 %#0 = poison
i129 %#1 = poison
i1 %#2 = poison
i129 %#3 = poison
i129 %#4 = poison
i129 %#5 = poison
i129 %#6 = poison
i129 %#7 = poison
i1 %#8 = poison
UB triggered on br


Pass: 
Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-tv' '-S' '-mtriple=x86_64--' '-expand-large-fp-convert' '-tv' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'


------------------- SMT STATS -------------------
Num queries: 17
Num invalid: 0
Num skips:   0
Num trivial: 3 (15.0%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     13 (76.5%)
Num UNSAT:   4 (23.5%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh -S -mtriple=x86_64-- -expand-large-fp-convert < /bitbucket/nlopes/llvm/llvm/test/Transforms/ExpandLargeFpConvert/X86/expand-large-fp-convert-fptoui129.ll | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/ExpandLargeFpConvert/X86/expand-large-fp-convert-fptoui129.ll
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/ExpandLargeFpConvert/X86/expand-large-fp-convert-fptoui129.ll
+ /home/nlopes/alive2/build/opt-alive.sh -S -mtriple=x86_64-- -expand-large-fp-convert

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/ExpandLargeFpConvert/X86/expand-large-fp-convert-fptoui129.ll

 

<-- Back