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

Test source: git

Log:

Source: <stdin>
ERROR: Unsupported type: x86_fp80

----------------------------------------
define half @si129tohalf(i129 %a) {
#0:
  %conv = sitofp i129 %a to half
  ret half %conv
}
=>
define half @si129tohalf(i129 %a) {
itofp-entry:
  %#0 = icmp eq i129 %a, 0
  br i1 %#0, label %itofp-return, label %itofp-if-end

itofp-if-end:
  %#1 = ashr i129 %a, 128
  %#2 = xor i129 %#1, %a
  %#3 = sub i129 %#2, %#1
  %#4 = ctlz i129 %#3, 1
  %#5 = trunc i129 %#4 to i32
  %#6 = sub i32 129, %#5
  %#7 = sub i32 128, %#5
  %#8 = icmp sgt i32 %#7, 24
  br i1 %#8, label %itofp-if-then4, label %itofp-if-else

itofp-if-then4:
  switch i32 %#6, label %itofp-sw-default [
    i32 25, label %itofp-sw-bb
    i32 26, label %itofp-sw-epilog
  ]

itofp-sw-bb:
  %#9 = shl i129 %#3, 1
  br label %itofp-sw-epilog

itofp-sw-default:
  %#10 = sub i32 103, %#5
  %#11 = zext i32 %#10 to i129
  %#12 = lshr i129 %#3, %#11
  %#13 = add i32 %#5, 26
  %#14 = zext i32 %#13 to i129
  %#15 = lshr i129 680564733841876926926749214863536422911, %#14
  %#16 = and i129 %#15, %#3
  %#17 = icmp ne i129 %#16, 0
  %#18 = zext i1 %#17 to i129
  %#19 = or i129 %#12, %#18
  br label %itofp-sw-epilog

itofp-sw-epilog:
  %#20 = phi i129 [ %#19, %itofp-sw-default ], [ %#3, %itofp-if-then4 ], [ %#9, %itofp-sw-bb ]
  %#21 = trunc i129 %#20 to i32
  %#22 = lshr i32 %#21, 2
  %#23 = and i32 %#22, 1
  %#24 = zext i32 %#23 to i129
  %#25 = or i129 %#20, %#24
  %#26 = add i129 %#25, 1
  %#27 = ashr i129 %#26, 2
  %a3 = and i129 %#26, 67108864
  %#28 = icmp eq i129 %a3, 0
  %#29 = trunc i129 %#27 to i32
  br i1 %#28, label %itofp-if-end26, label %itofp-if-then20

itofp-if-then20:
  %#32 = ashr i129 %#26, 3
  %#33 = trunc i129 %#32 to i32
  br label %itofp-if-end26

itofp-if-else:
  %#36 = add i32 %#5, 4294967191
  %#37 = zext i32 %#36 to i129
  %#38 = shl i129 %#3, %#37
  %#39 = trunc i129 %#38 to i32
  br label %itofp-if-end26

itofp-if-end26:
  %#42 = phi i32 [ %#33, %itofp-if-then20 ], [ %#29, %itofp-sw-epilog ], [ %#39, %itofp-if-else ]
  %#43 = phi i32 [ %#6, %itofp-if-then20 ], [ %#7, %itofp-sw-epilog ], [ %#7, %itofp-if-else ]
  %#44 = trunc i129 %#1 to i32
  %#45 = and i32 %#44, 2147483648
  %#46 = shl i32 %#43, 23
  %#47 = add i32 %#46, 1065353216
  %#48 = and i32 %#42, 8388607
  %#49 = or i32 %#48, %#45
  %#50 = or i32 %#49, %#47
  %#51 = bitcast i32 %#50 to float
  %#52 = fptrunc float %#51 to half
  br label %itofp-return

itofp-return:
  %#53 = phi half [ %#52, %itofp-if-end26 ], [ 0x0000, %itofp-entry ]
  ret half %#53
}
Transformation doesn't verify! (unsound)
ERROR: Source is more defined than target

Example:
i129 %a = poison

Source:
half %conv = poison

Target:
i1 %#0 = 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: 9
Num invalid: 0
Num skips:   0
Num trivial: 0 (0.0%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     8 (88.9%)
Num UNSAT:   1 (11.1%)
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-si129tofp.ll | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/ExpandLargeFpConvert/X86/expand-large-fp-convert-si129tofp.ll
+ /home/nlopes/alive2/build/opt-alive.sh -S -mtriple=x86_64-- -expand-large-fp-convert
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/ExpandLargeFpConvert/X86/expand-large-fp-convert-si129tofp.ll

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-si129tofp.ll

 

<-- Back