mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
e574246489
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173356 91177308-0d34-0410-b5e6-96231b3b80d8
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
|
|
}
|