forked from OSchip/llvm-project
[EarlyCSE] Remove unnecessary operand swap.
- As min/max are commutative operators, there is no need to swap operands. That breaks the convention calculating the hash value.
This commit is contained in:
parent
e45b0708ae
commit
f787fe15d8
|
@ -199,7 +199,6 @@ static bool matchSelectWithOptionalNotCond(Value *V, Value *&Cond, Value *&A,
|
|||
case CmpInst::ICMP_SLE:
|
||||
case CmpInst::ICMP_SGE:
|
||||
Pred = CmpInst::getInversePredicate(Pred);
|
||||
std::swap(A, B);
|
||||
Inversed = true;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=kaveri -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
|
||||
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=kaveri -earlycse-debug-hash -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
|
||||
|
||||
; GCN-LABEL: {{^}}v_sad_u32_pat1:
|
||||
; GCN: v_sad_u32 v{{[0-9]+}}, s{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}
|
||||
|
|
Loading…
Reference in New Issue