-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Copy link
Labels
generated by fuzzerllvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmiscompilation
Description
It is a variant of #115574.
Reproducer: https://alive2.llvm.org/ce/z/FLg923
define ptr @src1(ptr %p, ptr %q) {
#0:
%cmp = icmp eq ptr %p, %q
%#1 = freeze i1 %cmp
%select = select i1 %#1, ptr %p, ptr %q
ret ptr %select
}
=>
define ptr @src1(ptr %p, ptr %q) {
#0:
%q.fr = freeze ptr %q
ret ptr %q.fr
}
Transformation doesn't verify!
ERROR: Value mismatch
Example:
ptr %p = pointer(non-local, block_id=1, offset=0) / Address=#x1
ptr %q = pointer(non-local, block_id=0, offset=1) / Address=#x1
Source:
i1 %cmp = #x1 (1)
i1 %#1 = #x1 (1)
ptr %select = pointer(non-local, block_id=1, offset=0) / Address=#x1
SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: #x0
Block 1 > size: 13 align: 1 alloc type: 0 alive: true address: #x1
Block 2 > size: 0 align: 1 alloc type: 0 alive: true address: #xf
Target:
ptr %q.fr = pointer(non-local, block_id=0, offset=1) / Address=#x1
TARGET MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: #x0
Block 1 > size: 13 align: 1 alloc type: 0 alive: true address: #x1
Block 2 > size: 0 align: 1 alloc type: 0 alive: true address: #xf
Source value: pointer(non-local, block_id=1, offset=0) / Address=#x1
Target value: pointer(non-local, block_id=0, offset=1) / Address=#x1
Metadata
Metadata
Assignees
Labels
generated by fuzzerllvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmiscompilation