mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
f95255b370
We use constant folding to see if an intrinsic evaluates to the same value as a constant that we know. If we don't take the undefinedness into account we get a value that doesn't match the actual implementation, and miscompiled code. This was uncovered by Chandler's simplifycfg changes. llvm-svn: 173356
9 lines
178 B
LLVM
9 lines
178 B
LLVM
; RUN: opt < %s -constprop -S | grep "ret i13 13"
|
|
; PR1816
|
|
declare i13 @llvm.cttz.i13(i13, i1)
|
|
|
|
define i13 @test() {
|
|
%X = call i13 @llvm.cttz.i13(i13 0, i1 false)
|
|
ret i13 %X
|
|
}
|