Files
clang-p2996/llvm/test/CodeGen/RISCV/pr94145.ll
Simon Pilgrim c9a86fa9a6 [DAG] canCreateUndefOrPoison - fix missing argument typo
We were missing the PoisonOnly argument (so Depth + 1 was being used instead and the default Depth = 0 argument then being silently used)

Fixes #94145 and serves as the test case for 9e22c7a0ea
2024-06-02 10:34:48 +01:00

21 lines
580 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=riscv32-- | FileCheck %s
; RUN: llc < %s -mtriple=riscv64-- | FileCheck %s
define i32 @PR94145(i16 %a0) {
; CHECK-LABEL: PR94145:
; CHECK: # %bb.0:
; CHECK-NEXT: andi a0, a0, 2
; CHECK-NEXT: seqz a0, a0
; CHECK-NEXT: li a1, 1
; CHECK-NEXT: sll a0, a1, a0
; CHECK-NEXT: ret
%lshr = lshr i16 %a0, 1
%and = and i16 %lshr, 1
%xor = xor i16 %and, 1
%shl = shl i16 1, %xor
%freeze = freeze i16 %shl
%zext = zext i16 %freeze to i32
ret i32 %zext
}