Files
clang-p2996/llvm/test/Transforms/InstCombine/early_constfold_changes_IR.ll
Bjorn Pettersson 0676acb6fd [test] Switch to use -passes syntax in a bunch of test cases
Should cover most of the tests for GVN, GVNHoist, GVNSink, GlobalOpt,
GlobalSplit, InstCombine, Reassociate, SROA and TailCallElim that
had not been updated earlier.
2022-11-29 13:29:02 +01:00

16 lines
355 B
LLVM

; This run line verifies that we get the expected constant fold.
; RUN: opt < %s -passes=instcombine -S | FileCheck %s
define i32 @foo(i32 %arg) #0 {
; CHECK-LABEL: @foo(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[AND:%.*]] = and i32 [[ARG:%.*]], 7
; CHECK-NEXT: ret i32 [[AND]]
;
entry:
%or = or i32 0, 7
%and = and i32 %arg, %or
ret i32 %and
}