2019-07-20 23:34:00 +02:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
|
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
2019-04-17 06:52:47 +02:00
|
|
|
; PR3439
|
|
|
|
|
|
|
|
define i32 @a(i32 %x) nounwind {
|
2019-07-20 23:34:00 +02:00
|
|
|
; CHECK-LABEL: @a(
|
|
|
|
; CHECK-NEXT: entry:
|
|
|
|
; CHECK-NEXT: [[REM:%.*]] = srem i32 [[X:%.*]], 2
|
|
|
|
; CHECK-NEXT: [[AND:%.*]] = and i32 [[REM]], 2
|
|
|
|
; CHECK-NEXT: ret i32 [[AND]]
|
|
|
|
;
|
2019-04-17 06:52:47 +02:00
|
|
|
entry:
|
2019-07-20 23:34:00 +02:00
|
|
|
%rem = srem i32 %x, 2
|
|
|
|
%and = and i32 %rem, 2
|
|
|
|
ret i32 %and
|
2019-04-17 06:52:47 +02:00
|
|
|
}
|