We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e317ee2 commit 6f1d83fCopy full SHA for 6f1d83f
llvm/test/Transforms/InstCombine/shift-binop.ll
@@ -1,6 +1,19 @@
1
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2
; RUN: opt < %s -passes=instcombine -S | FileCheck %s
3
4
+;define i32 @src(i32 %x, i32 %shamt, i32 %c) {
5
+; %shl = shl nuw i32 %x, %shamt
6
+; %c2 = shl nuw i32 %c, %shamt
7
+; %max = call i32 @llvm.umin(i32 %shl, i32 %c2)
8
+; ret i32 %max
9
+;}
10
+
11
+;define i32 @tgt(i32 %x, i32 %shamt, i32 %c) {
12
+; %max = call i32 @llvm.umin(i32 %x, i32 %c)
13
+; %shl = shl i32 %max, %shamt
14
+; ret i32 %shl
15
16
17
define i8 @src1(i8 %arg0) {
18
; CHECK-LABEL: @src1(
19
; CHECK-NEXT: [[SHL:%.*]] = shl nuw i8 [[ARG0:%.*]], 1
0 commit comments