File tree Expand file tree Collapse file tree 2 files changed +30
-2
lines changed
include/llvm/CodeGen/GlobalISel
test/CodeGen/AMDGPU/GlobalISel Expand file tree Collapse file tree 2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ bool GIMatchTableExecutor::executeMatchTable(
61
61
// Bypass the flag check on the instruction, and only look at the MCInstrDesc.
62
62
bool NoFPException = !State.MIs [0 ]->getDesc ().mayRaiseFPException ();
63
63
64
- const uint16_t Flags = State.MIs [0 ]->getFlags ();
64
+ const uint32_t Flags = State.MIs [0 ]->getFlags ();
65
65
66
66
enum RejectAction { RejectAndGiveUp, RejectAndResume };
67
67
auto handleReject = [&]() -> RejectAction {
@@ -80,7 +80,7 @@ bool GIMatchTableExecutor::executeMatchTable(
80
80
for (auto MIB : OutMIs) {
81
81
// Set the NoFPExcept flag when no original matched instruction could
82
82
// raise an FP exception, but the new instruction potentially might.
83
- uint16_t MIBFlags = Flags | MIB.getInstr ()->getFlags ();
83
+ uint32_t MIBFlags = Flags | MIB.getInstr ()->getFlags ();
84
84
if (NoFPException && MIB->mayRaiseFPException ())
85
85
MIBFlags |= MachineInstr::NoFPExcept;
86
86
if (Observer)
Original file line number Diff line number Diff line change
1
+ # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
2
+ # RUN: llc -mtriple=amdgcn-- -run-pass=instruction-select -o - %s | FileCheck %s
3
+
4
+ # Checks MI Flags are preserved on selected instructions.
5
+
6
+ ---
7
+ name : s_or_i32_disjoint
8
+ tracksRegLiveness : true
9
+ regBankSelected : true
10
+ legalized : true
11
+ body : |
12
+ bb.0:
13
+ liveins: $sgpr0, $sgpr1
14
+
15
+ ; CHECK-LABEL: name: s_or_i32_disjoint
16
+ ; CHECK: liveins: $sgpr0, $sgpr1
17
+ ; CHECK-NEXT: {{ $}}
18
+ ; CHECK-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
19
+ ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
20
+ ; CHECK-NEXT: [[S_OR_B32_:%[0-9]+]]:sreg_32 = disjoint S_OR_B32 [[COPY]], [[COPY1]], implicit-def dead $scc
21
+ ; CHECK-NEXT: $sgpr0 = COPY [[S_OR_B32_]]
22
+ ; CHECK-NEXT: SI_RETURN_TO_EPILOG implicit $sgpr0
23
+ %0:sgpr(s32) = COPY $sgpr0
24
+ %1:sgpr(s32) = COPY $sgpr1
25
+ %2:sgpr(s32) = disjoint G_OR %0, %1
26
+ $sgpr0 = COPY %2
27
+ SI_RETURN_TO_EPILOG implicit $sgpr0
28
+ ...
You can’t perform that action at this time.
0 commit comments