LLVM: lib/CodeGen/GlobalISel/CombinerHelperArtifacts.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

25

26#define DEBUG_TYPE "gi-combiner"

27

28using namespace llvm;

29

33

35 LLT DstTy = MRI.getType(Dst);

36 LLT SrcTy = MRI.getType(Merge->getSourceReg(0));

37

38

39 assert(Merge->getNumSources() == 2 && "Unexpected number of operands");

40

41

42

43

44

45

46

47

48

49

51 return false;

52

54 B.buildAnyExt(Dst, Merge->getSourceReg(0));

55 };

56 return true;

57}

58

62

64 LLT DstTy = MRI.getType(Dst);

65 LLT SrcTy = MRI.getType(Merge->getSourceReg(0));

66

67

68

69

70

71

72

73

74

75

76

77

79 return false;

80

82 B.buildZExt(Dst, Merge->getSourceReg(0));

83 };

84 return true;

85}

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")

This contains common combine transformations that may be used in a combine pass,or by the target else...

Interface for Targets to specify which operations they can successfully select and how the others sho...

This file declares the MachineIRBuilder class.

bool matchMergeXAndZero(const MachineInstr &MI, BuildFnTy &MatchInfo) const

Definition CombinerHelperArtifacts.cpp:59

bool matchMergeXAndUndef(const MachineInstr &MI, BuildFnTy &MatchInfo) const

Definition CombinerHelperArtifacts.cpp:30

MachineRegisterInfo & MRI

bool isLegalOrBeforeLegalizer(const LegalityQuery &Query) const

Represents a G_MERGE_VALUES.

Helper class to build MachineInstr.

Representation of each machine instruction.

Wrapper class representing virtual and physical registers.

This is an optimization pass for GlobalISel generic memory operations.

std::function< void(MachineIRBuilder &)> BuildFnTy

decltype(auto) cast(const From &Val)

cast - Return the argument parameter cast to the specified type.