[all-commits] [llvm/llvm-project] bece10: [NFC][InstCombine] Add miscompile reproducer from ...
Roman Lebedev via All-commits
all-commits at lists.llvm.org
Fri Dec 16 09:29:20 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bece10c0fd4760460fba5d2fc7002eea346a7d6c
https://github.com/llvm/llvm-project/commit/bece10c0fd4760460fba5d2fc7002eea346a7d6c
Author: Roman Lebedev <lebedev.ri at gmail.com>
Date: 2022-12-16 (Fri, 16 Dec 2022)
Changed paths:
A llvm/test/Transforms/InstCombine/D139275_c4001580.ll
M llvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest-phis.ll
Log Message:
-----------
[NFC][InstCombine] Add miscompile reproducer from https://reviews.llvm.org/D139275#4001580
SimplifyCFG change is correct and not at fault here.
The actual miscompile appears to be happening in InstCombine.
```
$ /builddirs/llvm-project/build-Clang15/bin/opt -load /repositories/alive2/build-Clang-release/tv/tv.so -load-pass-plugin /repositories/alive2/build-Clang-release/tv/tv.so -passes='tv,instcombine,tv' -o /dev/null /repositories/llvm-project/llvm/test/Transforms/InstCombine/D139275_c4001580.ll
----------------------------------------
define float @D139275_c4001580(float %arg) {
%0:
%i = fcmp ugt float %arg, 0.000000
%i1 = fcmp ult float %arg, 1.000000
%i2 = and i1 %i, %i1
%i3 = fcmp uge float %arg, 0.100000
%i4 = xor i1 %i, %i2
%i5 = select i1 %i4, float 0.100000, float 0.000000
%i6 = and i1 %i3, %i2
%i7 = fadd float %arg, -0.100000
%i8 = select i1 %i6, float %i7, float %i5
ret float %i8
}
=>
define float @D139275_c4001580(float %arg) {
%0:
%i = fcmp ugt float %arg, 0.000000
%i1 = fcmp ult float %arg, 1.000000
%i2 = and i1 %i, %i1
%i3 = fcmp uge float %arg, 0.100000
%i7 = fadd float %arg, -0.100000
%i5 = select i1 %i3, float %i7, float 0.100000
%i8 = select i1 %i2, float %i5, float 0.000000
ret float %i8
}
Transformation doesn't verify! (unsound)
ERROR: Value mismatch
Example:
float %arg = #x3dcbb820 (0.099472284317?)
Source:
i1 %i = #x1 (1)
i1 %i1 = #x1 (1)
i1 %i2 = #x1 (1)
i1 %i3 = #x0 (0)
i1 %i4 = #x0 (0)
float %i5 = #x00000000 (+0.0)
i1 %i6 = #x0 (0)
float %i7 = #xba0a5680 (-0.000527717173?)
float %i8 = #x00000000 (+0.0)
Target:
i1 %i = #x1 (1)
i1 %i1 = #x1 (1)
i1 %i2 = #x1 (1)
i1 %i3 = #x0 (0)
float %i7 = #xba0a5680 (-0.000527717173?)
float %i5 = #x3dcccccd (0.100000001490?)
float %i8 = #x3dcccccd (0.100000001490?)
Source value: #x00000000 (+0.0)
Target value: #x3dcccccd (0.100000001490?)
Pass: (anonymous namespace)::TVPass
Command line: '/builddirs/llvm-project/build-Clang15/bin/opt' '-load' '/repositories/alive2/build-Clang-release/tv/tv.so' '-load-pass-plugin' '/repositories/alive2/build-Clang-release/tv/tv.so' '-passes=tv,instcombine,tv' '-o' '/dev/null' '/repositories/llvm-project/llvm/test/Transforms/InstCombine/D139275_c4001580.ll'
Alive2: Transform doesn't verify!
```
Commit: f3e602a4701446310689ddf267c4b528fa429c00
https://github.com/llvm/llvm-project/commit/f3e602a4701446310689ddf267c4b528fa429c00
Author: Roman Lebedev <lebedev.ri at gmail.com>
Date: 2022-12-16 (Fri, 16 Dec 2022)
Changed paths:
M llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-2.ll
Log Message:
-----------
[NFC] Adjust adjusted manual checklines in DebugInfo to be less sensitive to the Value name
The test was passing for me locally, but fails on bots:
https://lab.llvm.org/buildbot/#/builders/98/builds/29290/steps/10/logs/stdio
Compare: https://github.com/llvm/llvm-project/compare/e2b9cd796b33...f3e602a47014
More information about the All-commits
mailing list